def _process_input_series(
        series: Union[TimeSeries, Sequence[TimeSeries]], **kwargs
    ):
        """Checks input series and coverts series and covariates in `kwargs` to sequences."""
        series = _check_input(series, name="series")
        for cov_name in ["past_covariates", "future_covariates"]:
            cov = kwargs.pop(cov_name, None)
            if cov is not None:
                cov = _check_input(cov, name=cov_name)
                _assert_same_length(series, cov, "series", cov_name)
                kwargs[cov_name] = cov
        return series, kwargs
Checks input series and coverts series and covariates in `kwargs` to sequences.
darts/ad/anomaly_model/anomaly_model.py