code: def test_forecastingbenchmark(tmp_path, expected_results_df, scorers):
      """Test benchmarking a forecaster estimator."""
      benchmark = ForecastingBenchmark()
  
      benchmark.add_estimator(NaiveForecaster(strategy="last"))
  
      cv_splitter = ExpandingWindowSplitter(
          initial_window=1,
          step_length=1,
          fh=1,
      )
      benchmark.add_task(data_loader_simple, cv_splitter, scorers)
  
      results_file = tmp_path / "results.csv"
      results_df = benchmark.run(results_file)
  
      results_df = results_df.drop(columns=["runtime_secs"])
  
      pd.testing.assert_frame_equal(
          expected_results_df,
          results_df,
          check_exact=False,
          atol=0,
          rtol=0.001,
      )
  
file_path: sktime/sktime/benchmarking/tests/test_forecasting.py
imports: import pandas
  import pytest
  from sktime.benchmarking.benchmarks import coerce_estimator_and_id
  from sktime.benchmarking.forecasting import ForecastingBenchmark
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.trend import TrendForecaster
  from sktime.performance_metrics.forecasting import MeanAbsoluteError, MeanAbsolutePercentageError, MeanSquaredPercentageError
  from sktime.split import ExpandingWindowSplitter
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 2 for calling a global function with example usage: test_forecastingbenchmark(tmp_path, expected_results_df, scorers) without return types