code: def test_predict_NotFittedError_when_fitted_is_False():
      """
      Test NotFittedError is raised when fitted is False.
      """
      forecaster = ForecasterSarimax(regressor=Sarimax(order=(1, 1, 1)))
  
      err_msg = re.escape(
          (
              "This Forecaster instance is not fitted yet. Call `fit` with "
              "appropriate arguments before using predict."
          )
      )
      with pytest.raises(NotFittedError, match=err_msg):
          forecaster.predict_interval(steps=5, alpha=0.05)
  
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 1 for calling a global function with example usage: test_predict_NotFittedError_when_fitted_is_False() without return types