def _extract_deterministic_series(self, series: TimeSeries, name_series: str):
        """Extract a deterministic series from `series` (quantile=0.5 if `series` is probabilistic)."""
        if series.is_deterministic:
            return series

        logger.warning(
            f"Scorer {str(self)} is expecting `{name_series}` to be a (sequence of) deterministic "
            f"timeseries (number of samples must be equal to 1, found: {series.n_samples}). The series "
            f"will be converted to a deterministic series by taking the median of the samples.",
        )
        return series.quantile_timeseries(quantile=0.5)
Extract a deterministic series from `series` (quantile=0.5 if `series` is probabilistic).
darts/ad/scorers/scorers.py