class_docstr: Generates index for future covariates on train and inference datasets.
class_docstr_tok: ["Generates","index","for","future","covariates","on","train","and","inference","datasets","."]
code: def generate_inference_idx(
      self,
      n: int,
      target: TimeSeries,
      covariates: Optional[TimeSeries] = None,
  ) -> Tuple[SupportedIndex, pd.Timestamp]:
      super().generate_inference_idx(n, target, covariates)
  
      # for prediction (`n` is given) with future covariates the returned index depends on the following cases:
      # case 0
      #     user supplied covariates: simply return the covariate time index; guarantees that an exception is
      #     raised if user supplied insufficient covariates
      # case 1
      #     user uses a LocalForecastingModel or model agnostic scenario (input_chunk_length is None):
      #     simply return the target time index.
      # case 2
      #     only input_chunk_length and output_chunk_length are given: we need to generate a time index that starts
      #     `input_chunk_length - 1` before the end of `target` and ends `max(n, output_chunk_length)` after the
      #     end of `target`; always True for all models except RegressionModels.
      # case 3
      #     covariate lags were given: we need to generate a time index that starts `-shift_start`
      #     steps before the end of `target` and has a length of `shift_steps + max(0, n - output_chunk_length)`,
      #     where `shift_steps` is `shift_end - shift_start`; can only be True for RegressionModels.
  
      target_end = target.end_time()
      if covariates is not None:  # case 0
          return covariates.time_index, target_end
  
      if self.input_chunk_length is None:
          steps_back_end = -1
          n_steps = n
      elif self.shift_start is None:  # case 2
          steps_back_end = self.input_chunk_length - 1
          n_steps = (
              steps_back_end + 1 + max(n, self.output_chunk_length)
          )
      else:  # case 3
          steps_back_end = -self.shift_start
          shift_steps = self.shift_end + steps_back_end + 1
          n_steps = shift_steps + max(0, n - self.output_chunk_length)
  
      return (
          generate_index(
              start=target.end_time() - target.freq * steps_back_end,
              length=n_steps,
              freq=target.freq,
          ),
          target_end,
      )
  
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 FutureCovariatesIndexGenerator obj's underlying member method code with example usage: obj.generate_inference_idx(n, target, covariates) and returns: generate_index,  target_end, covariates,  target_end