code: def test_check_predict_input_TypeError_when_ForecasterSarimax_last_window_exog_index_frequency_is_not_index_freq():
      """ """
      last_window_exog = pd.Series(
          np.arange(10),
          index=pd.date_range(start="2018", periods=10, freq="Y"),
      )
      index_freq = "M"
      _, last_window_exog_index = preprocess_last_window(
          last_window=last_window_exog.iloc[:0]
      )
  
      err_msg = re.escape(
          (
              f"Expected frequency of type {index_freq} for `last_window_exog`. "
              f"Got {last_window_exog_index.freqstr}."
          )
      )
      with pytest.raises(TypeError, match=err_msg):
          check_predict_input(
              forecaster_name="ForecasterSarimax",
              steps=10,
              fitted=True,
              included_exog=True,
              index_type=pd.DatetimeIndex,
              index_freq=index_freq,
              window_size=5,
              last_window=pd.Series(
                  np.arange(10),
                  index=pd.date_range(
                      start="1/1/2018", periods=10, freq="M"
                  ),
              ),
              last_window_exog=last_window_exog,
              exog=pd.Series(
                  np.arange(10),
                  index=pd.date_range(
                      start="30/11/2018", periods=10, freq="M"
                  ),
              ),
              exog_type=pd.Series,
              exog_col_names=None,
              interval=None,
              alpha=None,
              max_steps=None,
              levels=None,
              series_col_names=None,
          )
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from skforecast.utils import check_predict_input
  from skforecast.utils import check_exog
  from skforecast.utils import preprocess_exog
  from skforecast.utils import preprocess_last_window
  from skforecast.exceptions import MissingValuesExogWarning
label_desc: Use image node_id 31 for calling a global function with example usage: test_check_predict_input_TypeError_when_ForecasterSarimax_last_window_exog_index_frequency_is_not_index_freq() without return types