docstr: Generates/extracts time index (or integer index) for covariates at model training time.
  
  Parameters
  ----------
  target
      The target TimeSeries used during training.
  covariates
      Optionally, the covariates used for training.
      If given, the returned time index is equal to the `covariates` time index. Else, the returned time index
      covers the minimum required covariate time span for training a specific forecasting model. These
      requirements are derived from parameters set at :class:`CovariatesIndexGenerator` creation.
docstr_tok: ["Generates\/extracts","time","index","(","or","integer","index",")","for","covariates","at","model","training","time",".","Parameters","--","--","--","--","--","target","The","target","TimeSeries","used","during","training",".","covariates","Optionally",",","the","covariates","used","for","training",".","If","given",",","the","returned","time","index","is","equal","to","the","`","covariates","`","time","index",".","Else",",","the","returned","time","index","covers","the","minimum","required","covariate","time","span","for","training","a","specific","forecasting","model",".","These","requirements","are","derived","from","parameters","set","at",":","class",":","`","CovariatesIndexGenerator","`","creation","."]
code: def generate_train_idx(
      self, target: TimeSeries, covariates: Optional[TimeSeries] = None
  ) -> Tuple[SupportedIndex, pd.Timestamp]:
      """
      Generates/extracts time index (or integer index) for covariates at model training time.
  
      Parameters
      ----------
      target
          The target TimeSeries used during training.
      covariates
          Optionally, the covariates used for training.
          If given, the returned time index is equal to the `covariates` time index. Else, the returned time index
          covers the minimum required covariate time span for training a specific forecasting model. These
          requirements are derived from parameters set at :class:`CovariatesIndexGenerator` creation.
      """
      pass
  
imports: from abc import ABC, abstractmethod
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import pandas
  from darts import TimeSeries
  from darts.dataprocessing.transformers import FittableDataTransformer
  from darts.logging import get_logger, raise_if, raise_log
  from darts.utils.timeseries_generation import generate_index
label_desc: Use image node_id 2 for calling the CovariatesIndexGenerator obj's underlying member method code with example usage: obj.generate_train_idx(target, covariates) without return types