code: def test_predict_interval_ValueError_when_ForecasterSarimax_last_window_exog_is_not_None_and_last_window_is_not_provided():
      """
      Check ValueError is raised when last_window_exog is not None, but
      last_window is not provided.
      """
      forecaster = ForecasterSarimax(regressor=Sarimax(order=(1, 1, 1)))
      forecaster.fit(y=y, exog=exog)
  
      err_msg = re.escape(
          (
              "To make predictions unrelated to the original data, both "
              "`last_window` and `last_window_exog` must be provided."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.predict_interval(
              steps=5,
              alpha=0.05,
              exog=exog_predict,
              last_window=None,
              last_window_exog=exog,
          )
  
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 2 for calling a global function with example usage: test_predict_interval_ValueError_when_ForecasterSarimax_last_window_exog_is_not_None_and_last_window_is_not_provided() without return types