code: def test_create_train_X_y_ValueError_when_series_and_exog_have_different_length(
      exog,
  ):
      """
      Test ValueError is raised when length of series is not equal to length exog.
      """
      series = pd.DataFrame(
          {"1": pd.Series(np.arange(7)), "2": pd.Series(np.arange(7))}
      )
      forecaster = ForecasterAutoregMultiSeries(
          LinearRegression(), lags=5
      )
  
      err_msg = re.escape(
          (
              f"`exog` must have same number of samples as `series`. "
              f"length `exog`: ({len(exog)}), length `series`: ({len(series)})"
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.create_train_X_y(series=series, exog=exog)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiSeries import ForecasterAutoregMultiSeries
  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
label_desc: Use image node_id 5 for calling a global function with example usage: test_create_train_X_y_ValueError_when_series_and_exog_have_different_length(exog) without return types