code: def test_Sarimax_append_refit_True():
      """
      Test Sarimax append with refit `True`. It is tested with the
      skforecast wrapper and the statsmodels SARIMAX.
      """
  
      refit = True
  
      # skforecast
      sarimax = Sarimax(
          order=(1, 0, 1), maxiter=1000, method="cg", disp=False
      )
      sarimax.fit(y=y_numpy, exog=exog_numpy)
      sarimax.append(y=y_lw_numpy, exog=exog_lw_numpy, refit=refit)
      preds_skforecast = sarimax.predict(
          steps=10, exog=exog_lw_predict_numpy
      )
  
      # statsmodels
      sarimax = SARIMAX(order=(1, 0, 1), endog=y_numpy, exog=exog_numpy)
      sarimax_res = sarimax.fit(maxiter=1000, method="cg", disp=False)
      updated_res = sarimax_res.append(
          endog=y_lw_numpy,
          exog=exog_lw_numpy,
          refit=refit,
          fit_kwargs={
              "method": "cg",
              "maxiter": 1000,
              "start_params": None,
              "disp": True,
          },
      )
      preds_statsmodels = updated_res.get_forecast(
          steps=10, exog=exog_lw_predict_numpy
      ).predicted_mean
  
      # statsmodels fitting all in the same array (not using append)
      sarimax = SARIMAX(
          order=(1, 0, 1),
          endog=np.append(y_numpy, y_lw_numpy),
          exog=np.append(exog_numpy, exog_lw_numpy),
      )
      sarimax_res = sarimax.fit(maxiter=1000, method="cg", disp=False)
      preds_statsmodels_2 = updated_res.get_forecast(
          steps=10, exog=exog_lw_predict_numpy
      ).predicted_mean
  
      # expected = np.array([0.73036069, 0.72898841, 0.76386263, 0.78298827, 0.7990083 ,
      #                      0.81640187, 0.78540917, 0.75749361, 0.72887628, 0.69840139])
  
      # np.testing.assert_almost_equal(preds_skforecast, expected)
      # np.testing.assert_almost_equal(preds_statsmodels, expected)
      # np.testing.assert_almost_equal(preds_statsmodels_2, expected)
      np.testing.assert_almost_equal(
          preds_skforecast, preds_statsmodels
      )
      np.testing.assert_almost_equal(
          preds_skforecast, preds_statsmodels_2
      )
  
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 16 for calling a global function with example usage: test_Sarimax_append_refit_True() without return types