code: def _check_evaluate_output(out, cv, y, scoring, return_data):
      assert isinstance(out, pd.DataFrame)
      # Check column names.
      scoring = _check_scores(scoring)
      columns = _get_column_order_and_datatype(scoring, return_data)
      assert (
          set(out.columns) == columns.keys()
      ), "Columns are not identical"
  
      # Check number of rows against number of splits.
      n_splits = cv.get_n_splits(y)
      assert out.shape[0] == n_splits
  
      # Check if all timings are positive.
      assert np.all(out.filter(like="_time") >= 0)
  
      # Check cutoffs.
      np.testing.assert_array_equal(
          out["cutoff"].to_numpy(),
          y.iloc[cv.get_cutoffs(y)].index.to_numpy(),
      )
  
      # Check training window lengths.
      if (
          isinstance(cv, SlidingWindowSplitter)
          and cv.initial_window is not None
      ):
          assert np.all(
              out.loc[0, "len_train_window"] == cv.initial_window
          )
          assert np.all(
              out.loc[1:, "len_train_window"] == cv.window_length
          )
  
      elif isinstance(cv, ExpandingWindowSplitter):
          step = cv.step_length
          start = cv.window_length
          end = start + (n_splits * step)
          expected = np.arange(start, end, step)
          actual = out.loc[:, "len_train_window"].to_numpy()
  
          np.testing.assert_array_equal(expected, actual)
          assert np.all(
              out.loc[0, "len_train_window"] == cv.window_length
          )
  
      else:
          assert np.all(
              out.loc[:, "len_train_window"] == cv.window_length
          )
  
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 1 for calling a global function with example usage: _check_evaluate_output(out, cv, y, scoring, return_data) without return types