code: def _create_lagged_data(
      self,
      target_series: Sequence[TimeSeries],
      past_covariates: Sequence[TimeSeries],
      future_covariates: Sequence[TimeSeries],
      max_samples_per_ts: int,
  ):
      (
          features,
          labels,
          _,
          self._static_covariates_shape,
      ) = create_lagged_training_data(
          target_series=target_series,
          output_chunk_length=self.output_chunk_length,
          past_covariates=past_covariates,
          future_covariates=future_covariates,
          lags=self._get_lags("target"),
          lags_past_covariates=self._get_lags("past"),
          lags_future_covariates=self._get_lags("future"),
          uses_static_covariates=self.uses_static_covariates,
          last_static_covariates_shape=None,
          max_samples_per_ts=max_samples_per_ts,
          multi_models=self.multi_models,
          check_inputs=False,
          concatenate=False,
      )
  
      expected_nb_feat = (
          features[0].shape[1]
          if isinstance(features, Sequence)
          else features.shape[1]
      )
      for i, (X_i, y_i) in enumerate(zip(features, labels)):
          # TODO: account for scenario where two wrong shapes can silently hide the problem
          if expected_nb_feat != X_i.shape[1]:
              shape_error_msg = []
              for ts, cov_name, arg_name in zip(
                  [target_series, past_covariates, future_covariates],
                  ["target", "past", "future"],
                  ["series", "past_covariates", "future_covariates"],
              ):
                  if (
                      ts is not None
                      and ts[i].width != self.input_dim[cov_name]
                  ):
                      shape_error_msg.append(
                          f"Expected {self.input_dim[cov_name]} components but received "
                          f"{ts[i].width} components at index {i} of `{arg_name}`."
                      )
              raise_log(ValueError("\n".join(shape_error_msg)), logger)
          features[i] = X_i[:, :, 0]
          labels[i] = y_i[:, :, 0]
  
      training_samples = np.concatenate(features, axis=0)
      training_labels = np.concatenate(labels, axis=0)
  
      return training_samples, training_labels
  
imports: from collections import OrderedDict
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  import pandas
  from sklearn.linear_model import LinearRegression
  from darts.logging import get_logger, raise_if, raise_if_not, raise_log
  from darts.models.forecasting.forecasting_model import GlobalForecastingModel
  from darts.timeseries import TimeSeries
  from darts.utils.data.tabularization import add_static_covariates_to_lagged_data, create_lagged_component_names, create_lagged_training_data
  from darts.utils.historical_forecasts import _check_optimizable_historical_forecasts_global_models, _optimized_historical_forecasts_all_points, _optimized_historical_forecasts_last_points_only, _process_historical_forecast_input
  from darts.utils.multioutput import MultiOutputRegressor
  from darts.utils.utils import _check_quantiles, get_single_series, seq2series, series2seq
label_desc: Use image node_id 11 for calling the RegressionModel obj's underlying member method code with example usage: obj._create_lagged_data(target_series, past_covariates, future_covariates, max_samples_per_ts) and returns: training_samples,  training_labels