code: def test_Sarimax_predict_with_pandas(y, exog, exog_predict):
      """
      Test Sarimax predict with pandas `y` and `exog`. It is tested with the
      skforecast wrapper and the statsmodels SARIMAX.
      """
  
      # skforecast
      sarimax = Sarimax(
          order=(1, 1, 1), maxiter=1000, method="cg", disp=False
      )
      sarimax.fit(y=y, exog=exog)
      preds_skforecast = sarimax.predict(steps=10, exog=exog_predict)
  
      # statsmodels
      sarimax = SARIMAX(order=(1, 1, 1), endog=y, exog=exog)
      sarimax_res = sarimax.fit(maxiter=1000, method="cg", disp=False)
      preds_statsmodels = (
          sarimax_res.get_forecast(steps=10, exog=exog_predict)
          .predicted_mean.rename("pred")
          .to_frame()
      )
  
      # if isinstance(y.index, pd.RangeIndex):
      #     idx = pd.RangeIndex(start=50, stop=60, step=1)
      # else:
      #     idx = pd.date_range(start='2050', periods=10, freq='A')
      #
      # expected = pd.DataFrame(
      #     data    = np.array([0.54251563, 0.57444558, 0.60419802, 0.63585684, 0.67238625,
      #                         0.70992311, 0.76089838, 0.7855481 , 0.73117064, 0.669226  ]),
      #     index   = idx,
      #     columns = ['pred']
      # )
  
      # pd.testing.assert_frame_equal(preds_skforecast, expected)
      # pd.testing.assert_frame_equal(preds_statsmodels, expected)
      pd.testing.assert_frame_equal(preds_skforecast, preds_statsmodels)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from skforecast.Sarimax import Sarimax
  from statsmodels.tsa.statespace.sarimax import SARIMAX
  from statsmodels.tsa.statespace.sarimax import SARIMAXResults
  from statsmodels.tsa.statespace.sarimax import SARIMAXResultsWrapper
  from .fixtures_Sarimax import y
  from .fixtures_Sarimax import y_lw
  from .fixtures_Sarimax import exog
  from .fixtures_Sarimax import exog_lw
  from .fixtures_Sarimax import exog_predict
  from .fixtures_Sarimax import exog_lw_predict
  from .fixtures_Sarimax import y_datetime
  from .fixtures_Sarimax import exog_datetime
  from .fixtures_Sarimax import exog_predict_datetime
label_desc: Use image node_id 11 for calling a global function with example usage: test_Sarimax_predict_with_pandas(y, exog, exog_predict) without return types