code: def test_create_train_X_y_output_when_series_10_and_exog_is_series_of_category():
      """
      Test the output of create_train_X_y when series has 2 columns and
      exog is a pandas series of category.
      """
      series = pd.DataFrame(
          {
              "l1": pd.Series(np.arange(10, dtype=float)),
              "l2": pd.Series(np.arange(10, dtype=float)),
          }
      )
      exog = pd.Series(range(10), name="exog", dtype="category")
  
      forecaster = ForecasterAutoregMultiSeries(
          LinearRegression(), lags=5, transformer_series=None
      )
      results = forecaster.create_train_X_y(series=series, exog=exog)
  
      expected = (
          pd.DataFrame(
              data=np.array(
                  [
                      [4.0, 3.0, 2.0, 1.0, 0.0],
                      [5.0, 4.0, 3.0, 2.0, 1.0],
                      [6.0, 5.0, 4.0, 3.0, 2.0],
                      [7.0, 6.0, 5.0, 4.0, 3.0],
                      [8.0, 7.0, 6.0, 5.0, 4.0],
                      [4.0, 3.0, 2.0, 1.0, 0.0],
                      [5.0, 4.0, 3.0, 2.0, 1.0],
                      [6.0, 5.0, 4.0, 3.0, 2.0],
                      [7.0, 6.0, 5.0, 4.0, 3.0],
                      [8.0, 7.0, 6.0, 5.0, 4.0],
                  ]
              ),
              index=pd.RangeIndex(start=0, stop=10, step=1),
              columns=["lag_1", "lag_2", "lag_3", "lag_4", "lag_5"],
          ).assign(
              exog=pd.Categorical(
                  [5, 6, 7, 8, 9] * 2, categories=range(10)
              ),
              l1=[1.0] * 5 + [0.0] * 5,
              l2=[0.0] * 5 + [1.0] * 5,
          ),
          pd.Series(
              data=np.array([5, 6, 7, 8, 9, 5, 6, 7, 8, 9]),
              index=pd.RangeIndex(start=0, stop=10, step=1),
              name="y",
              dtype=float,
          ),
          pd.RangeIndex(start=0, stop=len(series), step=1),
          pd.Index(np.array([5, 6, 7, 8, 9, 5, 6, 7, 8, 9])),
      )
  
      for i in range(len(expected)):
          if isinstance(expected[i], pd.DataFrame):
              pd.testing.assert_frame_equal(results[i], expected[i])
          elif isinstance(expected[i], pd.Series):
              pd.testing.assert_series_equal(results[i], expected[i])
          else:
              np.testing.assert_array_equal(results[i], expected[i])
  
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 15 for calling a global function with example usage: test_create_train_X_y_output_when_series_10_and_exog_is_series_of_category() without return types