def test_predict_return_type(self, config):
        """Check that predict's output are properly unpacked depending on input type"""
        aggregator_cls, cls_kwargs, _ = config
        aggregator = aggregator_cls(**cls_kwargs)

        if isinstance(aggregator, FittableAggregator):
            aggregator.fit(self.real_anomalies, self.mts_anomalies1)

        # single TimeSeries
        assert isinstance(aggregator.predict(self.mts_anomalies1), TimeSeries)

        # Sequence of one TimeSeries
        assert isinstance(
            aggregator.predict([self.mts_anomalies1]),
            Sequence,
        )

        # Sequence of several TimeSeries
        assert isinstance(
            aggregator.predict([self.mts_anomalies1, self.mts_anomalies2]),
            Sequence,
        )
Check that predict's output are properly unpacked depending on input type
darts/tests/ad/test_aggregators.py