code: def test_Sarimax_predict_interval_with_pandas(y, exog, exog_predict):
      """
      Test Sarimax predict with confidence intervals using pandas `y` and `exog`.
      It is tested with the skforecast wrapper and the statsmodels SARIMAX.
      """
  
      alpha = 0.05
  
      # 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, return_conf_int=True, alpha=alpha
      )
  
      # 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
      )
      preds_statsmodels = pd.concat(
          (
              preds_statsmodels.predicted_mean,
              preds_statsmodels.conf_int(alpha=alpha),
          ),
          axis=1,
      )
      preds_statsmodels.columns = ["pred", "lower_bound", "upper_bound"]
  
      # 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, -1.19541248,  2.28044374],
      #                         [ 0.57444558, -1.81113178,  2.96002293],
      #                         [ 0.60419802, -2.26035953,  3.46875557],
      #                         [ 0.63585684, -2.62746432,  3.899178  ],
      #                         [ 0.67238625, -2.94147506,  4.28624756],
      #                         [ 0.70992311, -3.22142148,  4.64126771],
      #                         [ 0.76089838, -3.46329933,  4.98509609],
      #                         [ 0.7855481 , -3.7121082 ,  5.28320441],
      #                         [ 0.73117064, -4.02408271,  5.48642398],
      #                         [ 0.669226  , -4.3302976 ,  5.66874961]]),
      #     index   = idx,
      #     columns = ['pred', 'lower_bound', 'upper_bound']
      # )
  
      # 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 14 for calling a global function with example usage: test_Sarimax_predict_interval_with_pandas(y, exog, exog_predict) without return types