code: def test_create_train_X_y_ValueError_when_series_and_exog_have_different_index():
      """
      Test ValueError is raised when series and exog have different index.
      """
      series = pd.DataFrame(
          {"1": pd.Series(np.arange(7)), "2": pd.Series(np.arange(7))}
      )
      series.index = pd.date_range(
          start="2022-01-01", periods=7, freq="1D"
      )
      forecaster = ForecasterAutoregMultiSeries(
          LinearRegression(), lags=5
      )
  
      exog = pd.Series(
          np.arange(7), index=pd.RangeIndex(start=0, stop=7, step=1)
      )
  
      err_msg = re.escape(
          (
              "Different index for `series` and `exog`. They must be equal "
              "to ensure the correct alignment of values."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.fit(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 6 for calling a global function with example usage: test_create_train_X_y_ValueError_when_series_and_exog_have_different_index() without return types