code: def test_fit_ValueError_when_len_exog_is_not_the_same_as_len_y():
      """
      Raise ValueError if the length of `exog` is different from the length of `y`.
      """
      y = pd.Series(data=np.arange(10))
      exog = pd.Series(data=np.arange(11))
      forecaster = ForecasterSarimax(regressor=Sarimax(order=(1, 1, 1)))
  
      err_msg = re.escape(
          (
              f"`exog` must have same number of samples as `y`. "
              f"length `exog`: ({len(exog)}), length `y`: ({len(y)})"
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.fit(y=y, exog=exog)
  
file_path: skforecast/skforecast/ForecasterSarimax/tests/test_fit.py
imports: import re
  import pytest
  import numpy
  import pandas
  from pmdarima.arima import ARIMA
  from skforecast.Sarimax import Sarimax
  from skforecast.ForecasterSarimax import ForecasterSarimax
  from .fixtures_ForecasterSarimax import y
  from .fixtures_ForecasterSarimax import y_datetime
label_desc: Use image node_id 1 for calling a global function with example usage: test_fit_ValueError_when_len_exog_is_not_the_same_as_len_y() without return types