def encode_inference(
        self,
        n: int,
        target: SupportedTimeSeries,
        past_covariates: Optional[SupportedTimeSeries] = None,
        future_covariates: Optional[SupportedTimeSeries] = None,
        encode_past: bool = True,
        encode_future: bool = True,
    ) -> tuple[
        Union[TimeSeries, Sequence[TimeSeries]], Union[TimeSeries, Sequence[TimeSeries]]
    ]:
        """Returns encoded index for all past and/or future covariates for inference/prediction.
        Which covariates are generated depends on the parameters used at model creation.

        Parameters
        ----------
        n
            The forecast horizon
        target
            The target TimeSeries used during training or passed to prediction as `series`.
        past_covariates
            Optionally, the past covariates used for training.
        future_covariates
            Optionally, the future covariates used for training.
        encode_past
            Whether to apply encoders for past covariates.
        encode_future
            Whether to apply encoders for future covariates.

        Returns
        -------
        Tuple[past_covariates, future_covariates]
            The past_covariates and/or future_covariates for prediction/inference including the encodings.
            If input {x}_covariates is None and no {x}_encoders are given, will return `None`
            for the {x}_covariates.
        """
        raise_if(
            not self.fit_called and self.requires_fit,
            f"`{self.__class__.__name__}` contains encoders or transformers which must be trained before inference. "
            "Call method `encode_train()` before `encode_inference()`.",
            logger=logger,
        )
        return self._launch_encoder(
            target=target,
            past_covariates=past_covariates,
            future_covariates=future_covariates,
            encoder_method=_EncoderMethod("inference"),
            n=n,
            encode_past=encode_past,
            encode_future=encode_future,
        )
Returns encoded index for all past and/or future covariates for inference/prediction.
        Which covariates are generated depends on the parameters used at model creation.

        Parameters
        ----------
        n
            The forecast horizon
        target
            The target TimeSeries used during training or passed to prediction as `series`.
        past_covariates
            Optionally, the past covariates used for training.
        future_covariates
            Optionally, the future covariates used for training.
        encode_past
            Whether to apply encoders for past covariates.
        encode_future
            Whether to apply encoders for future covariates.

        Returns
        -------
        Tuple[past_covariates, future_covariates]
            The past_covariates and/or future_covariates for prediction/inference including the encodings.
            If input {x}_covariates is None and no {x}_encoders are given, will return `None`
            for the {x}_covariates.
        
darts/dataprocessing/encoders/encoders.py