docstr: testing _get_training_data function
code: def test_training_data_creation(self, mode):
      """testing _get_training_data function"""
      # lags defined using lists of integers
      model_instance = RegressionModel(
          lags=self.lags_1["target"],
          lags_past_covariates=self.lags_1["past"],
          lags_future_covariates=self.lags_1["future"],
          multi_models=mode,
      )
  
      max_samples_per_ts = 17
  
      (
          training_samples,
          training_labels,
      ) = model_instance._create_lagged_data(
          target_series=self.target_series,
          past_covariates=self.past_covariates,
          future_covariates=self.future_covariates,
          max_samples_per_ts=max_samples_per_ts,
      )
  
      # checking number of dimensions
      assert len(training_samples.shape) == 2  # samples, features
      assert (
          len(training_labels.shape) == 2
      )  # samples, components (multivariate)
      assert training_samples.shape[0] == training_labels.shape[0]
      assert (
          training_samples.shape[0]
          == len(self.target_series) * max_samples_per_ts
      )
      assert (
          training_samples.shape[1]
          == len(self.lags_1["target"]) * self.target_series[0].width
          + len(self.lags_1["past"]) * self.past_covariates[0].width
          + len(self.lags_1["future"]) * self.future_covariates[0].width
      )
  
      # check last sample
      assert list(training_samples[0, :]) == [
          79.0,
          179.0,
          279.0,
          80.0,
          180.0,
          280.0,
          81.0,
          181.0,
          281.0,
          10078.0,
          10178.0,
          10080.0,
          10180.0,
          20077.0,
          20084.0,
      ]
      assert list(training_labels[0]) == [82, 182, 282]
  
      # lags defined using dictionaries
      # cannot use 'default_lags' because it's converted in `fit()`, before calling `_created_lagged_data`
      model_instance = RegressionModel(
          lags={
              "0-trgt-0": [-4, -3],
              "0-trgt-1": [-3, -2],
              "0-trgt-2": [-2, -1],
          },
          lags_past_covariates={"0-pcov-0": [-10], "0-pcov-1": [-7]},
          lags_future_covariates={"0-fcov-0": (2, 2)},
          multi_models=mode,
      )
  
      max_samples_per_ts = 3
  
      # using only one series of each
      (
          training_samples,
          training_labels,
      ) = model_instance._create_lagged_data(
          target_series=self.target_series[0],
          past_covariates=self.past_covariates[0],
          future_covariates=self.future_covariates[0],
          max_samples_per_ts=max_samples_per_ts,
      )
  
      # checking number of dimensions
      assert len(training_samples.shape) == 2  # samples, features
      assert (
          len(training_labels.shape) == 2
      )  # samples, components (multivariate)
      assert training_samples.shape[0] == training_labels.shape[0]
      assert training_samples.shape[0] == max_samples_per_ts
      assert (
          training_samples.shape[1]
          == 6  # [-4, -3], [-3, -2], [-2, -1]
          + 2  # [-10], [-7]
          + 4  # [-2, -1, 0, 1]
      )
  
      # check last sample
      assert list(training_labels[0]) == [97, 197, 297]
      # lags are grouped by components instead of lags
      assert list(training_samples[0, :]) == [
          93,
          94,
          194,
          195,
          295,
          296,  # comp_i = comp_0 + i*100
          10087,
          10190,  # past cov; target + 10'000
          20095,
          20096,
          20097,
          20098,  # future cov; target + 20'000
      ]
  
      # checking the name of the lagged features
      model_instance.fit(
          series=self.target_series[0],
          past_covariates=self.past_covariates[0],
          future_covariates=self.future_covariates[0],
      )
      assert model_instance.lagged_feature_names == [
          "0-trgt-0_target_lag-4",
          "0-trgt-0_target_lag-3",
          "0-trgt-1_target_lag-3",
          "0-trgt-1_target_lag-2",
          "0-trgt-2_target_lag-2",
          "0-trgt-2_target_lag-1",
          "0-pcov-0_pastcov_lag-10",
          "0-pcov-1_pastcov_lag-7",
          "0-fcov-0_futcov_lag-2",
          "0-fcov-0_futcov_lag-1",
          "0-fcov-0_futcov_lag0",
          "0-fcov-0_futcov_lag1",
      ]
  
imports: import copy
  import functools
  import itertools
  import math
  from unittest.mock import patch
  import numpy
  import pandas
  import pytest
  from sklearn.ensemble import HistGradientBoostingRegressor, RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  import darts
  from darts import TimeSeries
  from darts.dataprocessing.encoders import FutureCyclicEncoder, PastDatetimeAttributeEncoder
  from darts.logging import get_logger
  from darts.metrics import mae, rmse
  from darts.models import CatBoostModel, LightGBMModel, LinearRegressionModel, NotImportedModule, RandomForest, RegressionModel, XGBModel
  from darts.utils import timeseries_generation
  from darts.utils.multioutput import MultiOutputRegressor
label_desc: Use image node_id 3 for calling the TestRegressionModels obj's underlying member method code with example usage: obj.test_training_data_creation(mode) without return types