code: def test_create_train_X_y_output_when_transformer_series_and_transformer_exog_with_different_series_lengths(
      transformer_series,
  ):
      """
      Test the output of create_train_X_y when using transformer_series and
      transformer_exog with series with different lengths.
      """
      series = pd.DataFrame(
          {
              "l1": np.arange(10, dtype=float),
              "l2": pd.Series(
                  [
                      np.nan,
                      np.nan,
                      2.0,
                      3.0,
                      4.0,
                      5.0,
                      6.0,
                      7.0,
                      8.0,
                      9.0,
                  ]
              ),
              "l3": pd.Series(
                  [
                      np.nan,
                      np.nan,
                      np.nan,
                      np.nan,
                      4.0,
                      5.0,
                      6.0,
                      7.0,
                      8.0,
                      9.0,
                  ]
              ),
          }
      )
      series.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",
                  "b",
                  "a",
                  "b",
                  "a",
                  "b",
                  "a",
                  "b",
                  "a",
                  "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 = ForecasterAutoregMultiSeries(
          regressor=LinearRegression(),
          lags=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.8703882797784892,
                          -1.2185435916898848,
                          -1.5666989036012806,
                          0.6743197452466179,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                          0.0,
                      ],
                      [
                          -0.5222329678670935,
                          -0.8703882797784892,
                          -1.2185435916898848,
                          0.3748237614897084,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                      ],
                      [
                          -0.17407765595569785,
                          -0.5222329678670935,
                          -0.8703882797784892,
                          -0.04719330653139179,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                          0.0,
                      ],
                      [
                          0.17407765595569785,
                          -0.17407765595569785,
                          -0.5222329678670935,
                          -0.8186223556022197,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                      ],
                      [
                          0.5222329678670935,
                          0.17407765595569785,
                          -0.17407765595569785,
                          2.0311273080241334,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                          0.0,
                      ],
                      [
                          0.8703882797784892,
                          0.5222329678670935,
                          0.17407765595569785,
                          0.2250757696112534,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                      ],
                      [
                          1.2185435916898848,
                          0.8703882797784892,
                          0.5222329678670935,
                          -0.8458492632164842,
                          0.0,
                          1.0,
                          1.0,
                          0.0,
                          0.0,
                      ],
                      [
                          -0.6546536707079772,
                          -1.091089451179962,
                          -1.5275252316519468,
                          -0.04719330653139179,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                      ],
                      [
                          -0.2182178902359924,
                          -0.6546536707079772,
                          -1.091089451179962,
                          -0.8186223556022197,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                      ],
                      [
                          0.2182178902359924,
                          -0.2182178902359924,
                          -0.6546536707079772,
                          2.0311273080241334,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                      ],
                      [
                          0.6546536707079772,
                          0.2182178902359924,
                          -0.2182178902359924,
                          0.2250757696112534,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                      ],
                      [
                          1.091089451179962,
                          0.6546536707079772,
                          0.2182178902359924,
                          -0.8458492632164842,
                          0.0,
                          1.0,
                          0.0,
                          1.0,
                          0.0,
                      ],
                      [
                          -0.29277002188455997,
                          -0.8783100656536799,
                          -1.4638501094227998,
                          2.0311273080241334,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                      ],
                      [
                          0.29277002188455997,
                          -0.29277002188455997,
                          -0.8783100656536799,
                          0.2250757696112534,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                      ],
                      [
                          0.8783100656536799,
                          0.29277002188455997,
                          -0.29277002188455997,
                          -0.8458492632164842,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                      ],
                  ]
              ),
              index=pd.RangeIndex(start=0, stop=15, step=1),
              columns=[
                  "lag_1",
                  "lag_2",
                  "lag_3",
                  "exog_1",
                  "exog_2_a",
                  "exog_2_b",
                  "l1",
                  "l2",
                  "l3",
              ],
          ),
          pd.Series(
              data=np.array(
                  [
                      -0.5222329678670935,
                      -0.17407765595569785,
                      0.17407765595569785,
                      0.5222329678670935,
                      0.8703882797784892,
                      1.2185435916898848,
                      1.5666989036012806,
                      -0.2182178902359924,
                      0.2182178902359924,
                      0.6546536707079772,
                      1.091089451179962,
                      1.5275252316519468,
                      0.29277002188455997,
                      0.8783100656536799,
                      1.4638501094227998,
                  ]
              ),
              index=pd.RangeIndex(start=0, stop=15, step=1),
              name="y",
              dtype=float,
          ),
          pd.date_range("1990-01-01", periods=10, freq="D"),
          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-06",
                  "1990-01-07",
                  "1990-01-08",
                  "1990-01-09",
                  "1990-01-10",
                  "1990-01-08",
                  "1990-01-09",
                  "1990-01-10",
              ],
              dtype="datetime64[ns]",
              freq=None,
          ),
      )
  
      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 23 for calling a global function with example usage: test_create_train_X_y_output_when_transformer_series_and_transformer_exog_with_different_series_lengths(transformer_series) without return types