code: def test_predict_interval_ValueError_when_last_window_exog_index_does_not_follow_training_set():
      """
      Raise ValueError if `last_window_exog` index does not start at the end
      of the index seen by the forecaster.
      """
      y_test = pd.Series(data=y_datetime.to_numpy())
      y_test.index = pd.date_range(
          start="2022-01-01", periods=50, freq="D"
      )
      lw_test = pd.Series(data=y_lw_datetime.to_numpy())
      lw_test.index = pd.date_range(
          start="2022-02-20", periods=50, freq="D"
      )
  
      exog_test = pd.Series(data=exog_datetime.to_numpy())
      exog_test.index = pd.date_range(
          start="2022-01-01", periods=50, freq="D"
      )
      exog_pred_test = pd.Series(data=exog_predict_datetime.to_numpy())
      exog_pred_test.index = pd.date_range(
          start="2022-04-11", periods=10, freq="D"
      )
      lw_exog_test = pd.Series(data=exog_lw_datetime.to_numpy())
      lw_exog_test.index = pd.date_range(
          start="2022-03-01", periods=50, freq="D"
      )
  
      forecaster = ForecasterSarimax(regressor=Sarimax(order=(1, 0, 0)))
      forecaster.fit(y=y_test, exog=exog_test)
      expected_index = expand_index(forecaster.extended_index, 1)[0]
  
      err_msg = re.escape(
          (
              f"To make predictions unrelated to the original data, `last_window_exog` "
              f"has to start at the end of the index seen by the forecaster.\n"
              f"    Series last index              : {forecaster.extended_index[-1]}.\n"
              f"    Expected index                 : {expected_index}.\n"
              f"    `last_window_exog` index start : {lw_exog_test.index[0]}."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.predict_interval(
              steps=5,
              alpha=0.05,
              exog=exog_pred_test,
              last_window=lw_test,
              last_window_exog=lw_exog_test,
          )
  
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 11 for calling a global function with example usage: test_predict_interval_ValueError_when_last_window_exog_index_does_not_follow_training_set() without return types