code: def test_create_train_X_y_ValueError_when_len_y_is_different_from_len_exog(
      y, exog
  ):
      """
      Test ValueError is raised when length of y is not equal to length exog.
      """
      forecaster = ForecasterAutoregCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=5,
      )
  
      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.create_train_X_y(y=y, exog=exog)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregCustom import ForecasterAutoregCustom
  from skforecast.preprocessing import TimeSeriesDifferentiator
  from skforecast.exceptions import MissingValuesExogWarning
  from sklearn.linear_model import LinearRegression
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import StandardScaler
  from sklearn.preprocessing import OneHotEncoder
  from .fixtures_ForecasterAutoregCustom import data
label_desc: Use image node_id 5 for calling a global function with example usage: test_create_train_X_y_ValueError_when_len_y_is_different_from_len_exog(y, exog) without return types