code: def test_forecasterX_regression():
      y, X = load_longley()
      pipe = ForecastX(
          forecaster_X=NaiveForecaster(),
          forecaster_y=SARIMAX(),
      )
      pipe.fit(y, X=X, fh=[1, 2, 3])
      result = pipe.predict()
  
      general_pipeline = Pipeline(
          [
              {
                  "skobject": NaiveForecaster(),
                  "name": "forecastX",
                  "edges": {"y": "X"},
              },
              {
                  "skobject": SARIMAX(),
                  "name": "forecastY",
                  "edges": {"X": "forecastX", "y": "y"},
              },
          ]
      )
  
      general_pipeline.fit(y=y, X=X, fh=[1, 2, 3])
      result_general = general_pipeline.predict(None, None)
      pd.testing.assert_series_equal(result, result_general)
  
imports: import numpy
  import pandas
  import pytest
  from skbase.utils.dependencies import _check_soft_dependencies
  from sktime.classification.dummy import DummyClassifier
  from sktime.datasets import load_arrow_head, load_longley
  from sktime.forecasting.compose import ForecastX
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.forecasting.sarimax import SARIMAX
  from sktime.pipeline.pipeline import Pipeline
  from sktime.split import temporal_train_test_split
  from sktime.transformations.compose import Id
  from sktime.transformations.series.boxcox import BoxCoxTransformer
  from sktime.transformations.series.detrend import Detrender
  from sktime.transformations.series.difference import Differencer
  from sktime.transformations.series.exponent import ExponentTransformer
  from sktime.transformations.series.lag import Lag
  from sktime.utils._testing.hierarchical import _bottom_hier_datagen, _make_hierarchical
label_desc: Use image node_id 9 for calling a global function with example usage: test_forecasterX_regression() without return types