code: def test_create_train_X_y_output_when_transformer_series_and_transformer_exog(
      transformer_series,
  ):
      """
      Test the output of create_train_X_y when using transformer_series and
      transformer_exog.
      """
      series = pd.DataFrame(
          {
              "1": np.arange(10, dtype=float),
              "2": np.arange(10, dtype=float),
          },
          index=pd.date_range("1990-01-01", periods=10, freq="D"),
      )
      exog = pd.DataFrame(
          {
              "exog_1": [
                  7.5,
                  24.4,
                  60.3,
                  57.3,
                  50.7,
                  41.4,
                  24.4,
                  87.2,
                  47.4,
                  23.8,
              ],
              "exog_2": [
                  "a",
                  "a",
                  "a",
                  "a",
                  "a",
                  "b",
                  "b",
                  "b",
                  "b",
                  "b",
              ],
          },
          index=pd.date_range("1990-01-01", periods=10, freq="D"),
      )
  
      transformer_exog = ColumnTransformer(
          [
              ("scale", StandardScaler(), ["exog_1"]),
              ("onehot", OneHotEncoder(), ["exog_2"]),
          ],
          remainder="passthrough",
          verbose_feature_names_out=False,
      )
  
      forecaster = ForecasterAutoregMultiSeriesCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors_3,
          name_predictors=["lag_1", "lag_2", "lag_3"],
          window_size=3,
          transformer_series=transformer_series,
          transformer_exog=transformer_exog,
      )
      results = forecaster.create_train_X_y(series=series, exog=exog)
  
      expected = (
          pd.DataFrame(
              data=np.array(
                  [
                      [
                          -0.87038828,
                          -1.21854359,
                          -1.5666989,
                          0.67431975,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                      ],
                      [
                          -0.52223297,
                          -0.87038828,
                          -1.21854359,
                          0.37482376,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                      ],
                      [
                          -0.17407766,
                          -0.52223297,
                          -0.87038828,
                          -0.04719331,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                      ],
                      [
                          0.17407766,
                          -0.17407766,
                          -0.52223297,
                          -0.81862236,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                      ],
                      [
                          0.52223297,
                          0.17407766,
                          -0.17407766,
                          2.03112731,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                      ],
                      [
                          0.87038828,
                          0.52223297,
                          0.17407766,
                          0.22507577,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                      ],
                      [
                          1.21854359,
                          0.87038828,
                          0.52223297,
                          -0.84584926,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                      ],
                      [
                          -0.87038828,
                          -1.21854359,
                          -1.5666989,
                          0.67431975,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                      ],
                      [
                          -0.52223297,
                          -0.87038828,
                          -1.21854359,
                          0.37482376,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                      ],
                      [
                          -0.17407766,
                          -0.52223297,
                          -0.87038828,
                          -0.04719331,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                      ],
                      [
                          0.17407766,
                          -0.17407766,
                          -0.52223297,
                          -0.81862236,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                      ],
                      [
                          0.52223297,
                          0.17407766,
                          -0.17407766,
                          2.03112731,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                      ],
                      [
                          0.87038828,
                          0.52223297,
                          0.17407766,
                          0.22507577,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                      ],
                      [
                          1.21854359,
                          0.87038828,
                          0.52223297,
                          -0.84584926,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                      ],
                  ]
              ),
              index=pd.RangeIndex(start=0, stop=14, step=1),
              columns=[
                  "lag_1",
                  "lag_2",
                  "lag_3",
                  "exog_1",
                  "exog_2_a",
                  "exog_2_b",
                  "1",
                  "2",
              ],
          ),
          pd.Series(
              data=np.array(
                  [
                      -0.52223297,
                      -0.17407766,
                      0.17407766,
                      0.52223297,
                      0.87038828,
                      1.21854359,
                      1.5666989,
                      -0.52223297,
                      -0.17407766,
                      0.17407766,
                      0.52223297,
                      0.87038828,
                      1.21854359,
                      1.5666989,
                  ]
              ),
              index=pd.RangeIndex(start=0, stop=14, step=1),
              name="y",
              dtype=float,
          ),
          pd.date_range("1990-01-01", periods=10, freq="D"),
          pd.Index(
              pd.DatetimeIndex(
                  [
                      "1990-01-04",
                      "1990-01-05",
                      "1990-01-06",
                      "1990-01-07",
                      "1990-01-08",
                      "1990-01-09",
                      "1990-01-10",
                      "1990-01-04",
                      "1990-01-05",
                      "1990-01-06",
                      "1990-01-07",
                      "1990-01-08",
                      "1990-01-09",
                      "1990-01-10",
                  ]
              )
          ),
      )
  
      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.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  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 29 for calling a global function with example usage: test_create_train_X_y_output_when_transformer_series_and_transformer_exog(transformer_series) without return types