code: def test_predict_interval_ForecasterSarimax_updates_extended_index_twice(
      regressor, y, idx
  ):
      """
      Test forecaster.extended_index is updated when using predict_interval twice.
      """
      y_fit = y.iloc[:30].copy()
  
      forecaster = ForecasterSarimax(regressor=regressor)
      forecaster.fit(y=y_fit)
  
      lw_1 = y.iloc[30:40].copy()
      forecaster.predict_interval(steps=5, alpha=0.05, last_window=lw_1)
      result_1 = forecaster.extended_index.copy()
      expected_1 = idx[:40]
  
      lw_2 = y.iloc[40:].copy()
      forecaster.predict_interval(steps=5, alpha=0.05, last_window=lw_2)
  
      pd.testing.assert_index_equal(result_1, expected_1)
      pd.testing.assert_index_equal(forecaster.extended_index, idx)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from pmdarima.arima import ARIMA
  from skforecast.Sarimax import Sarimax
  from skforecast.ForecasterSarimax import ForecasterSarimax
  from skforecast.utils import expand_index
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import StandardScaler
  from sklearn.preprocessing import OneHotEncoder
  from .fixtures_ForecasterSarimax import y
  from .fixtures_ForecasterSarimax import y_lw
  from .fixtures_ForecasterSarimax import exog
  from .fixtures_ForecasterSarimax import exog_lw
  from .fixtures_ForecasterSarimax import exog_predict
  from .fixtures_ForecasterSarimax import exog_lw_predict
  from .fixtures_ForecasterSarimax import y_datetime
  from .fixtures_ForecasterSarimax import y_lw_datetime
  from .fixtures_ForecasterSarimax import exog_datetime
  from .fixtures_ForecasterSarimax import exog_lw_datetime
  from .fixtures_ForecasterSarimax import exog_predict_datetime
  from .fixtures_ForecasterSarimax import exog_lw_predict_datetime
  from .fixtures_ForecasterSarimax import df_exog
  from .fixtures_ForecasterSarimax import df_exog_lw
  from .fixtures_ForecasterSarimax import df_exog_predict
  from .fixtures_ForecasterSarimax import df_exog_lw_predict
  from .fixtures_ForecasterSarimax import df_exog_datetime
  from .fixtures_ForecasterSarimax import df_exog_lw_datetime
  from .fixtures_ForecasterSarimax import df_exog_predict_datetime
  from .fixtures_ForecasterSarimax import df_exog_lw_predict_datetime
label_desc: Use image node_id 15 for calling a global function with example usage: test_predict_interval_ForecasterSarimax_updates_extended_index_twice(regressor, y, idx) without return types