code: def test_recursive_reduction(y, index_names, y_dict):
      """Test index column names match input names for recursive reduction."""
      y = y_dict[y]
  
      regressor = make_pipeline(
          RandomForestRegressor(random_state=1),
      )
  
      forecaster2 = make_reduction(
          regressor,
          scitype="tabular-regressor",
          transformers=[WindowSummarizer(**kwargs, n_jobs=1)],
          window_length=None,
          strategy="recursive",
          pooling="global",
      )
  
      forecaster2.fit(y, fh=[1, 2])
      y_pred = forecaster2.predict(fh=[1, 2, 12])
      check_eval(y_pred.index.names, index_names)
  
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 3 for calling a global function with example usage: test_recursive_reduction(y, index_names, y_dict) without return types