code: def test_create_train_X_y_output_when_lags_5_steps_1_and_exog_is_dataframe_of_category():
      """
      Test output of create_train_X_y when regressor is LinearRegression,
      lags is 5, steps is 1 and exog is pandas DataFrame of category.
      """
      series = pd.DataFrame(
          {
              "l1": pd.Series(np.arange(10), dtype=float),
              "l2": pd.Series(np.arange(50, 60), dtype=float),
          }
      )
      exog = pd.DataFrame(
          {
              "exog_1": pd.Categorical(range(10)),
              "exog_2": pd.Categorical(range(100, 110)),
          }
      )
  
      forecaster = ForecasterAutoregMultiVariate(
          LinearRegression(),
          level="l2",
          lags=5,
          steps=1,
          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,
                          54.0,
                          53.0,
                          52.0,
                          51.0,
                          50.0,
                      ],
                      [
                          5.0,
                          4.0,
                          3.0,
                          2.0,
                          1.0,
                          55.0,
                          54.0,
                          53.0,
                          52.0,
                          51.0,
                      ],
                      [
                          6.0,
                          5.0,
                          4.0,
                          3.0,
                          2.0,
                          56.0,
                          55.0,
                          54.0,
                          53.0,
                          52.0,
                      ],
                      [
                          7.0,
                          6.0,
                          5.0,
                          4.0,
                          3.0,
                          57.0,
                          56.0,
                          55.0,
                          54.0,
                          53.0,
                      ],
                      [
                          8.0,
                          7.0,
                          6.0,
                          5.0,
                          4.0,
                          58.0,
                          57.0,
                          56.0,
                          55.0,
                          54.0,
                      ],
                  ],
                  dtype=float,
              ),
              index=pd.RangeIndex(start=5, stop=10, step=1),
              columns=[
                  "l1_lag_1",
                  "l1_lag_2",
                  "l1_lag_3",
                  "l1_lag_4",
                  "l1_lag_5",
                  "l2_lag_1",
                  "l2_lag_2",
                  "l2_lag_3",
                  "l2_lag_4",
                  "l2_lag_5",
              ],
          ).assign(
              exog_1_step_1=pd.Categorical(
                  range(5, 10), categories=range(10)
              ),
              exog_2_step_1=pd.Categorical(
                  range(105, 110), categories=range(100, 110)
              ),
          ),
          {
              1: pd.Series(
                  data=np.array(
                      [55.0, 56.0, 57.0, 58.0, 59.0], dtype=float
                  ),
                  index=pd.RangeIndex(start=5, stop=10, step=1),
                  name="l2_step_1",
              )
          },
      )
  
      pd.testing.assert_frame_equal(results[0], expected[0])
      assert isinstance(results[1], dict)
      assert all(isinstance(x, pd.Series) for x in results[1].values())
      assert results[1].keys() == expected[1].keys()
      for key in expected[1]:
          pd.testing.assert_series_equal(
              results[1][key], expected[1][key]
          )
  
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 24 for calling a global function with example usage: test_create_train_X_y_output_when_lags_5_steps_1_and_exog_is_dataframe_of_category() without return types