code: def test_backtesting_forecaster_TypeError_when_forecaster_not_supported_types():
      """
      Test TypeError is raised in backtesting_forecaster if Forecaster is not one
      of the types supported by the function.
      """
      forecaster = ForecasterAutoreg(
          regressor=Ridge(random_state=123), lags=2
      )
  
      err_msg = re.escape(
          (
              "`forecaster` must be of type `ForecasterSarimax`, for all other "
              "types of forecasters use the functions available in the other "
              "`model_selection` modules."
          )
      )
      with pytest.raises(TypeError, match=err_msg):
          backtesting_sarimax(
              forecaster=forecaster,
              y=y_datetime,
              steps=3,
              metric="mean_absolute_error",
              initial_train_size=len(y_datetime[:-12]),
              fixed_train_size=False,
              gap=0,
              allow_incomplete_fold=False,
              exog=None,
              refit=False,
              alpha=None,
              interval=None,
              verbose=False,
              show_progress=False,
          )
  
imports: import re
  import pytest
  import platform
  from pytest import approx
  import numpy
  import pandas
  from sklearn.linear_model import Ridge
  from pmdarima.arima import ARIMA
  from skforecast.Sarimax import Sarimax
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from skforecast.ForecasterSarimax import ForecasterSarimax
  from skforecast.model_selection_sarimax import backtesting_sarimax
  from ...ForecasterSarimax.tests.fixtures_ForecasterSarimax import y_datetime
  from ...ForecasterSarimax.tests.fixtures_ForecasterSarimax import exog_datetime
label_desc: Use image node_id 1 for calling a global function with example usage: test_backtesting_forecaster_TypeError_when_forecaster_not_supported_types() without return types