code: def get_component_names(
      series: Sequence[TimeSeries],
      past_covariates: Optional[Sequence[TimeSeries]] = None,
      future_covariates: Optional[Sequence[TimeSeries]] = None,
      idx: int = 0,
  ) -> Tuple[
      List[str],
      Optional[List[str]],
      Optional[List[str]],
      Optional[List[str]],
  ]:
      """Extract and return the components of target series, static covariate, past and future covariates series.
  
      Parameters
      ----------
      model
          any `ForecastingModel`.
      series
           A sequence of target `TimeSeries`.
      past_covariates
           Optionally, a sequence of past covariates `TimeSeries`.
      future_covariates
           Optionally, a sequence of future covariates `TimeSeries`.
      idx
          the index of the input sequences to extract the components from.
      """
      target_components = series[idx].components.tolist()
  
      # covariates
      static_covariates = series[idx].static_covariates
      sc_components = (
          static_covariates.columns.tolist()
          if static_covariates is not None
          else []
      )
      pc_components = (
          past_covariates[idx].components.tolist()
          if past_covariates is not None
          else []
      )
      fc_components = (
          future_covariates[idx].components.tolist()
          if future_covariates is not None
          else []
      )
  
      # set to None if not available
      sc_components = sc_components if sc_components else None
      pc_components = pc_components if pc_components else None
      fc_components = fc_components if fc_components else None
      return (
          target_components,
          sc_components,
          pc_components,
          fc_components,
      )
  
file_path: darts/darts/explainability/utils.py
imports: from typing import List, Optional, Sequence, Tuple, Union
  from darts import TimeSeries
  from darts.logging import get_logger, raise_if, raise_if_not, raise_log
  from darts.models.forecasting.forecasting_model import ForecastingModel
  from darts.utils.statistics import stationarity_tests
  from darts.utils.utils import series2seq
label_desc: Use image node_id 3 for calling a global function with example usage: get_component_names(series, past_covariates, future_covariates, idx) and returns: target_components,  sc_components,  pc_components,  fc_components