code: def create_lagged_component_names(
      target_series: Optional[
          Union[TimeSeries, Sequence[TimeSeries]]
      ] = None,
      past_covariates: Optional[
          Union[TimeSeries, Sequence[TimeSeries]]
      ] = None,
      future_covariates: Optional[
          Union[TimeSeries, Sequence[TimeSeries]]
      ] = None,
      lags: Optional[Union[Sequence[int], Dict[str, List[int]]]] = None,
      lags_past_covariates: Optional[
          Union[Sequence[int], Dict[str, List[int]]]
      ] = None,
      lags_future_covariates: Optional[
          Union[Sequence[int], Dict[str, List[int]]]
      ] = None,
      output_chunk_length: int = 1,
      concatenate: bool = True,
      use_static_covariates: bool = False,
  ) -> Tuple[List[List[str]], List[List[str]]]:
      """
      Helper function called to retrieve the name of the features and labels arrays created with
      `create_lagged_data()`. The order of the features is the following:
  
      Along the `n_lagged_features` axis, `X` has the following structure:
          lagged_target | lagged_past_covariates | lagged_future_covariates | static covariates
  
      For `*_lags=[-2,-1]` and `*_series.n_components = 2` (lags shared across all the components),
      each `lagged_*` has the following structure (grouped by lags):
          comp0_*_lag-2 | comp1_*_lag-2 | comp0_*_lag_-1 | comp1_*_lag-1
      For `*_lags={'comp0':[-2, -1], 'comp1':[-5, -3]}` and `*_series.n_components = 2` (component-
      specific lags), each `lagged_*` has the following structure (grouped by components):
          comp0_*_lag-2 | comp0_*_lag-1 | comp1_*_lag_-5 | comp1_*_lag-3
  
      and for static covariates (2 static covariates acting on 2 target components):
          cov0_*_target_comp0 | cov0_*_target_comp1 | cov1_*_target_comp0 | cov1_*_target_comp1
  
      Along the `n_lagged_labels` axis, `y` has the following structure (for `output_chunk_length=4` and
      `target_series.n_components=2`):
          comp0_target_lag0 | comp1_target_lag0 | ... | comp0_target_lag3 | comp1_target_lag3
  
      Note : will only use the component names of the first series from `target_series`, `past_covariates`,
      `future_covariates`, and static_covariates.
  
      The naming convention for target, past and future covariates is: ``"{name}_{type}_lag{i}"``, where:
  
          - ``{name}`` the component name of the (first) series
          - ``{type}`` is the feature type, one of "target", "pastcov", and "futcov"
          - ``{i}`` is the lag value
  
      The naming convention for static covariates is: ``"{name}_statcov_target_{comp}"``, where:
  
          - ``{name}`` the static covariate name of the (first) series
          - ``{comp}`` the target component name of the (first) that the static covariate act on. If the static
              covariate acts globally on a multivariate target series, will show "global".
  
      Returns
      -------
      features_cols_name
          The names of the lagged features in the `X` array generated by `create_lagged_data()`
          as a `List[str]`. If `concatenate=True`, also contains the columns names for
          the `y` array (on the right).
      labels_cols_name
          The names of the lagged features in the `y` array generated by `create_lagged_data()`
           as a `List[str]`.
  
      See Also
      --------
          tabularization.create_lagged_data : generate the lagged features and labels as (list of) Arrays.
      """
      target_series = series2seq(target_series)
      past_covariates = series2seq(past_covariates)
      future_covariates = series2seq(future_covariates)
  
      lagged_feature_names = []
      label_feature_names = []
      for variate, variate_lags, variate_type in zip(
          [target_series, past_covariates, future_covariates],
          [lags, lags_past_covariates, lags_future_covariates],
          ["target", "pastcov", "futcov"],
      ):
          if variate is None or variate_lags is None:
              continue
  
          components = get_single_series(variate).components.tolist()
          if isinstance(variate_lags, dict):
              for name in components:
                  lagged_feature_names += [
                      f"{name}_{variate_type}_lag{lag}"
                      for lag in variate_lags[name]
                  ]
          else:
              lagged_feature_names += [
                  f"{name}_{variate_type}_lag{lag}"
                  for lag in variate_lags
                  for name in components
              ]
  
          if variate_type == "target" and lags:
              label_feature_names = [
                  f"{name}_target_lag{lag}"
                  for lag in range(output_chunk_length)
                  for name in components
              ]
  
      # static covariates
      if use_static_covariates:
          static_covs = get_single_series(
              target_series
          ).static_covariates
          # static covariate names
          names = static_covs.columns.tolist()
          # target components that the static covariates reference to
          comps = static_covs.index.tolist()
          lagged_feature_names += [
              f"{name}_statcov_target_{comp}"
              for name in names
              for comp in comps
          ]
  
      if concatenate:
          lagged_feature_names += label_feature_names
  
      return lagged_feature_names, label_feature_names
  
imports: import warnings
  from functools import reduce
  from math import inf
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  from itertools import chain
  import numpy
  import pandas
  from numpy.lib.stride_tricks import as_strided
  from darts.logging import get_logger, raise_if, raise_if_not, raise_log
  from darts.timeseries import TimeSeries
  from darts.utils.utils import get_single_series, series2seq
label_desc: Use image node_id 5 for calling a global function with example usage: create_lagged_component_names(target_series, past_covariates, future_covariates, lags, lags_past_covariates, lags_future_covariates, output_chunk_length, concatenate, use_static_covariates) and returns: lagged_feature_names,  label_feature_names