def helper_eval_metric_multiple_series(
        aggregator,
        series: Sequence[TimeSeries],
        pred_series: Sequence[TimeSeries],
        expected_vals: dict[str, list[float]],
    ):
        """Evaluate model on multiple series, for all 4 supported metric functions"""
        for m_func in ["accuracy", "recall", "f1", "precision"]:
            np.testing.assert_array_almost_equal(
                np.array(
                    aggregator.eval_metric(
                        series,
                        pred_series,
                        metric=m_func,
                    )
                ),
                np.array(expected_vals[m_func]),
                decimal=1,
            )
Evaluate model on multiple series, for all 4 supported metric functions
darts/tests/ad/test_aggregators.py