def helper_eval_metric_single_series(
        aggregator,
        series: TimeSeries,
        pred_series: TimeSeries,
        expected_vals: dict[str, float],
    ):
        """Evaluate model on given series, for all 4 supported metric functions"""
        for m_func in ["accuracy", "recall", "f1", "precision"]:
            assert (
                np.abs(
                    expected_vals[m_func]
                    - aggregator.eval_metric(
                        series,
                        pred_series,
                        metric=m_func,
                    )
                )
                < delta
            )
Evaluate model on given series, for all 4 supported metric functions
darts/tests/ad/test_aggregators.py