code: def _get_expected_scores(forecaster, cv, param_grid, y, X, scoring):
      scores = np.zeros(len(param_grid))
      for i, params in enumerate(param_grid):
          f = forecaster.clone()
          f.set_params(**params)
          out = evaluate(f, cv, y, X=X, scoring=scoring)
          scores[i] = out.loc[:, f"test_{scoring.name}"].mean()
      return scores
  
imports: import numpy
  import pytest
  from sklearn.model_selection import ParameterGrid, ParameterSampler
  from sktime.datasets import load_airline, load_longley
  from sktime.forecasting.arima import ARIMA
  from sktime.forecasting.compose import TransformedTargetForecaster
  from sktime.forecasting.exp_smoothing import ExponentialSmoothing
  from sktime.forecasting.model_evaluation import evaluate
  from sktime.forecasting.model_selection import ForecastingGridSearchCV, ForecastingRandomizedSearchCV, ForecastingSkoptSearchCV
  from sktime.forecasting.model_selection._tune import BaseGridSearch
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.tests._config import TEST_N_ITERS, TEST_OOS_FHS, TEST_RANDOM_SEEDS, TEST_WINDOW_LENGTHS_INT
  from sktime.forecasting.trend import PolynomialTrendForecaster
  from sktime.performance_metrics.forecasting import MeanAbsolutePercentageError, MeanSquaredError
  from sktime.performance_metrics.forecasting.probabilistic import CRPS, PinballLoss
  from sktime.split import SingleWindowSplitter, SlidingWindowSplitter
  from sktime.tests.test_switch import run_test_for_class
  from sktime.transformations.series.detrend import Detrender
  from sktime.transformations.series.impute import Imputer
  from sktime.utils._testing.hierarchical import _make_hierarchical
  from sktime.utils.parallel import _get_parallel_test_fixtures
label_desc: Use image node_id 1 for calling a global function with example usage: _get_expected_scores(forecaster, cv, param_grid, y, X, scoring) and returns: scores