code: def test_evaluate_error_score(
      error_score, return_data, strategy, backend, scores
  ):
      """Test evaluate to raise warnings and exceptions according to error_score value."""
      # skip test for dask backend if dask is not installed
      if backend == "dask" and not _check_soft_dependencies(
          "dask", severity="none"
      ):
          return None
  
      forecaster = ExponentialSmoothing(sp=12)
      y = load_airline()
      # add NaN to make ExponentialSmoothing fail
      y.iloc[1] = np.nan
      fh = [1, 2, 3]
      cv = SlidingWindowSplitter(
          step_length=33, initial_window=36, fh=fh
      )
      scoring_name = [f"test_{score.name}" for score in scores]
  
      args = {
          "forecaster": forecaster,
          "y": y,
          "cv": cv,
          "scoring": scores,
          "return_data": return_data,
          "error_score": error_score,
          "strategy": strategy,
      }
      args.update(backend)
  
      if error_score in [np.nan, 1000]:
          # known bug - loky backend does not pass on warnings, #5307
          if backend != "loky":
              with pytest.warns(FitFailedWarning):
                  results = evaluate(**args)
          else:
              results = evaluate(**args)
  
          if isinstance(error_score, type(np.nan)):
              assert all(results[scoring_name].isna().sum() > 0)
          if error_score == 1000:
              assert all(results[scoring_name].max() == 1000)
      if error_score == "raise":
          with pytest.raises(Exception):  # noqa: B017
              evaluate(**args)
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.linear_model import LinearRegression
  from sktime.datasets import load_airline, load_longley
  from sktime.exceptions import FitFailedWarning
  from sktime.forecasting.arima import ARIMA, AutoARIMA
  from sktime.forecasting.compose._reduce import DirectReductionForecaster
  from sktime.forecasting.exp_smoothing import ExponentialSmoothing
  from sktime.forecasting.model_evaluation import evaluate
  from sktime.forecasting.model_evaluation._functions import _check_scores, _get_column_order_and_datatype
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.tests._config import TEST_FHS, TEST_STEP_LENGTHS_INT
  from sktime.performance_metrics.forecasting import MeanAbsoluteError, MeanAbsolutePercentageError, MeanAbsoluteScaledError
  from sktime.performance_metrics.forecasting.probabilistic import CRPS, EmpiricalCoverage, LogLoss, PinballLoss
  from sktime.split import ExpandingWindowSplitter, SlidingWindowSplitter
  from sktime.tests.test_switch import run_test_for_class
  from sktime.utils._testing.estimator_checks import _assert_array_almost_equal
  from sktime.utils._testing.forecasting import make_forecasting_problem
  from sktime.utils._testing.hierarchical import _make_hierarchical
  from sktime.utils._testing.series import _make_series
  from sktime.utils.parallel import _get_parallel_test_fixtures
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 6 for calling a global function with example usage: test_evaluate_error_score(error_score, return_data, strategy, backend, scores) and returns: None