code: def forecasting_validation(
      dataset_loader: Callable,
      cv_splitter: BaseSplitter,
      scorers: List[BaseMetric],
      estimator: BaseForecaster,
      **kwargs,
  ) -> Dict[str, Union[float, str]]:
      """Run validation for a forecasting estimator.
  
      Parameters
      ----------
      dataset_loader : Callable
          A function which returns a dataset, like from `sktime.datasets`.
      cv_splitter : BaseSplitter object
          Splitter used for generating validation folds.
      scorers : a list of BaseMetric objects
          Each BaseMetric output will be included in the results.
      estimator : BaseForecaster object
          Estimator to benchmark.
  
      Returns
      -------
      Dictionary of benchmark results for that forecaster
      """
      y = dataset_loader()
      results = {}
      scores_df = evaluate(
          forecaster=estimator, y=y, cv=cv_splitter, scoring=scorers
      )
      for scorer in scorers:
          scorer_name = scorer.name
          for ix, row in scores_df.iterrows():
              results[f"{scorer_name}_fold_{ix}_test"] = row[
                  f"test_{scorer_name}"
              ]
          results[f"{scorer_name}_mean"] = scores_df[
              f"test_{scorer_name}"
          ].mean()
          results[f"{scorer_name}_std"] = scores_df[
              f"test_{scorer_name}"
          ].std()
      return results
  
file_path: sktime/sktime/benchmarking/forecasting.py
imports: import functools
  from typing import Callable, Dict, List, Optional, Union
  from sktime.benchmarking.benchmarks import BaseBenchmark
  from sktime.forecasting.base import BaseForecaster
  from sktime.forecasting.model_evaluation import evaluate
  from sktime.performance_metrics.base import BaseMetric
  from sktime.split.base import BaseSplitter
label_desc: Use image node_id 1 for calling a global function with example usage: forecasting_validation(dataset_loader, cv_splitter, scorers, estimator) and returns: results