NearlyOptimalBest-of-Both-WorldsAlgorithmsfor OnlineLearningwithFeedbackGraphs