code: def test_create_train_X_y_ValueError_when_level_not_in_series():
      """
      Test ValueError is raised when level not in series column names.
      """
      series = pd.DataFrame(
          {"1": pd.Series(np.arange(5)), "l2": pd.Series(np.arange(5))}
      )
      forecaster = ForecasterAutoregMultiVariate(
          LinearRegression(), level="l1", lags=3, steps=2
      )
  
      series_col_names = list(series.columns)
  
      err_msg = re.escape(
          (
              f"One of the `series` columns must be named as the `level` of the forecaster.\n"
              f"    forecaster `level` : {forecaster.level}.\n"
              f"    `series` columns   : {series_col_names}."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.create_train_X_y(series=series)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  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 4 for calling a global function with example usage: test_create_train_X_y_ValueError_when_level_not_in_series() without return types