def _assert_timeseries(series: TimeSeries, name: str = "series"):
    """Checks if given input is of type Darts TimeSeries"""
    if not isinstance(series, TimeSeries):
        raise_log(
            ValueError(
                f"all series in `{name}` must be `TimeSeries`. Received {type(series)}."
            ),
            logger=logger,
        )
Checks if given input is of type Darts TimeSeries
darts/ad/utils.py