code: def test_TypeError_when_regressor_is_not_pmdarima_ARIMA_when_initialization():
      """
      Raise TypeError if regressor is not of type pmdarima.arima.ARIMA or
      skforecast.Sarimax.Sarimax when initializing the forecaster.
      """
      regressor = LinearRegression()
  
      err_msg = re.escape(
          (
              f"`regressor` must be an instance of type pmdarima.arima.ARIMA "
              f"or skforecast.Sarimax.Sarimax. Got {type(regressor)}."
          )
      )
      with pytest.raises(TypeError, match=err_msg):
          ForecasterSarimax(regressor=regressor)
  
file_path: skforecast/skforecast/ForecasterSarimax/tests/test_init.py
imports: import re
  import pytest
  from pytest import approx
  import numpy
  import pandas
  from pmdarima.arima import ARIMA
  from skforecast.Sarimax import Sarimax
  from skforecast.ForecasterSarimax import ForecasterSarimax
  from skforecast.exceptions import IgnoredArgumentWarning
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 1 for calling a global function with example usage: test_TypeError_when_regressor_is_not_pmdarima_ARIMA_when_initialization() without return types