code: def test_sliding_window_transform_explicit():
      """Test sliding window transform explicit.
  
      testing with explicitly written down expected outputs intended to help future
      contributors understand the transformation
      """
      y = pd.Series(np.arange(9))
      X = pd.concat([y + 100, y + 200], axis=1)
      fh = ForecastingHorizon([1, 3], is_relative=True)
      window_length = 2
  
      yt_actual, Xt_tabular_actual = _sliding_window_transform(
          y, window_length, fh, X
      )
      _, Xt_time_series_actual = _sliding_window_transform(
          y, window_length, fh, X, scitype="time-series-regressor"
      )
  
      yt_expected = np.array(
          [[2.0, 4.0], [3.0, 5.0], [4.0, 6.0], [5.0, 7.0], [6.0, 8.0]]
      )
  
      Xt_tabular_expected = np.array(
          [
              [0.0, 1.0, 100.0, 101.0, 200.0, 201.0],
              [1.0, 2.0, 101.0, 102.0, 201.0, 202.0],
              [2.0, 3.0, 102.0, 103.0, 202.0, 203.0],
              [3.0, 4.0, 103.0, 104.0, 203.0, 204.0],
              [4.0, 5.0, 104.0, 105.0, 204.0, 205.0],
          ]
      )
  
      Xt_time_series_expected = np.array(
          [
              [[0.0, 1.0], [100.0, 101.0], [200.0, 201.0]],
              [[1.0, 2.0], [101.0, 102.0], [201.0, 202.0]],
              [[2.0, 3.0], [102.0, 103.0], [202.0, 203.0]],
              [[3.0, 4.0], [103.0, 104.0], [203.0, 204.0]],
              [[4.0, 5.0], [104.0, 105.0], [204.0, 205.0]],
          ]
      )
  
      np.testing.assert_array_equal(yt_actual, yt_expected)
      np.testing.assert_array_equal(
          Xt_tabular_actual, Xt_tabular_expected
      )
      np.testing.assert_array_equal(
          Xt_time_series_actual, Xt_time_series_expected
      )
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.base import BaseEstimator, RegressorMixin
  from sklearn.dummy import DummyRegressor
  from sklearn.linear_model import LinearRegression
  from sklearn.pipeline import make_pipeline
  from sktime.datasets import load_airline
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.forecasting.compose import DirectTabularRegressionForecaster, DirectTimeSeriesRegressionForecaster, DirRecTabularRegressionForecaster, DirRecTimeSeriesRegressionForecaster, MultioutputTabularRegressionForecaster, MultioutputTimeSeriesRegressionForecaster, RecursiveTabularRegressionForecaster, RecursiveTimeSeriesRegressionForecaster, make_reduction
  from sktime.forecasting.compose._reduce import _sliding_window_transform
  from sktime.forecasting.tests._config import TEST_OOS_FHS, TEST_WINDOW_LENGTHS_INT
  from sktime.performance_metrics.forecasting import mean_absolute_percentage_error
  from sktime.regression.base import BaseRegressor
  from sktime.regression.interval_based import TimeSeriesForestRegressor
  from sktime.split import SlidingWindowSplitter, temporal_train_test_split
  from sktime.split.tests.test_split import _get_windows
  from sktime.transformations.panel.reduce import Tabularizer
  from sktime.utils._testing.forecasting import make_forecasting_problem
  from sktime.utils.validation.forecasting import check_fh
label_desc: Use image node_id 5 for calling a global function with example usage: test_sliding_window_transform_explicit() without return types