code: def y_dict():
      """Dictionary of dataframes for tests."""
      y_dict = {}
  
      # Load data that will be the basis of tests
      y = load_airline()
      y_multi = get_examples(mtype="pd-multiindex", as_scitype="Panel")[
          0
      ]
      y_dict["y_multi"] = y_multi
  
      # y train will be univariate data set
      y_train, y_test = temporal_train_test_split(y)
      y_dict["y_train"] = y_train
  
      # Create train and test panel sample data
      mi = pd.MultiIndex.from_product(
          [[0], y_train.index], names=["instances", "timepoints"]
      )
      y_group1 = pd.DataFrame(y_train.values, index=mi, columns=["y"])
  
      mi = pd.MultiIndex.from_product(
          [[1], y_train.index], names=["instances", "timepoints"]
      )
      y_group2 = pd.DataFrame(y_train.values, index=mi, columns=["y"])
  
      y_train_grp = pd.concat([y_group1, y_group2])
      y_dict["y_train_grp"] = y_train_grp
  
      mi = pd.MultiIndex.from_product(
          [[0], y_test.index], names=["instances", "timepoints"]
      )
      y_group1 = pd.DataFrame(y_test.values, index=mi, columns=["y"])
  
      mi = pd.MultiIndex.from_product(
          [[1], y_test.index], names=["instances", "timepoints"]
      )
      y_group2 = pd.DataFrame(y_test.values, index=mi, columns=["y"])
  
      y_test_grp = pd.concat([y_group1, y_group2])
      y_dict["y_test_grp"] = y_test_grp
  
      # Get hierarchical data
      y_train_hier = get_examples(mtype="pd_multiindex_hier")[0]
  
      # Create unbalanced hierarchical data, i.e. not a full tree with all branches.
      X = y_train_hier.reset_index().copy()
      X = X[~((X["bar"] == 2) & (X["foo"] == "b"))]
      X = X[["foo", "bar"]].drop_duplicates()
  
      time_names = y_train.index.names[-1]
      timeframe = y_train.index.to_frame()
  
      X2 = X.merge(timeframe, how="cross")
  
      freq_inferred = y_train.index.freq
  
      x_names = X.columns
      if not isinstance(x_names, list):
          x_names = x_names.to_list()
  
      y_train_reset = y_train.reset_index()
  
      X3 = X2.merge(y_train_reset, on="Period")
  
      freq_inferred = y_train.index.freq
  
      y_train_hier_unequal = X3.groupby(x_names, as_index=True).apply(
          lambda df: df.drop(x_names, axis=1)
          .set_index(time_names)
          .asfreq(freq_inferred)
      )
      y_dict["y_train_hier_unequal"] = y_train_hier_unequal
  
      # Create integer index data
      y_numeric = y_train.copy()
      y_numeric.index = pd.to_numeric(y_numeric.index)
      y_numeric.index.names = [
          None
      ]  # setting None to cover "no index name" case
      y_dict["y_numeric"] = y_numeric
  
      return y_dict
  
imports: from sktime.tests.test_switch import run_test_for_class
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  import random
  import numpy
  import pandas
  import pytest
  from sklearn.ensemble import GradientBoostingRegressor, HistGradientBoostingRegressor, RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  from sklearn.pipeline import make_pipeline
  from sktime.datasets import load_airline, load_solar
  from sktime.datatypes import get_examples
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.forecasting.compose import make_reduction
  from sktime.forecasting.compose._reduce import _DirectReducer, _RecursiveReducer
  from sktime.performance_metrics.forecasting import mean_absolute_percentage_error
  from sktime.split import temporal_train_test_split
  from sktime.transformations.series.summarize import WindowSummarizer
  from sktime.utils._testing.hierarchical import _make_hierarchical
label_desc: Use image node_id 1 for calling a global function with example usage: y_dict() and returns: y_dict