def eval_metric(
        self,
        anomalies: Union[TimeSeries, Sequence[TimeSeries]],
        series: Union[TimeSeries, Sequence[TimeSeries]],
        window: int = 1,
        metric: Literal["recall", "precision", "f1", "accuracy"] = "recall",
    ) -> Union[float, Sequence[float]]:
        """Aggregates the (sequence of) multivariate series given as input into one (sequence of)
        series and evaluates the results against the ground truth anomaly labels.

        Parameters
        ----------
        anomalies
            The (sequence of) binary ground truth anomaly labels (1 if it is an anomaly and 0 if not).
        series
            The (sequence of) predicted multivariate binary series to aggregate.
        window
            (Sequence of) integer value indicating the number of past samples each point
            represents in the (sequence of) series. The parameter will be used by the
            function `_window_adjustment_anomalies()` in darts.ad.utils to transform
            anomalies.
        metric
            The name of the metric function to use. Must be one of "recall", "precision", "f1", and "accuracy".
            Default: "recall".

        Returns
        -------
        Union[float, Sequence[float]]
            (Sequence of) score for the (sequence of) series.
        """
        pred_anomalies = self.predict(series)
        return eval_metric_from_binary_prediction(
            anomalies=anomalies,
            pred_anomalies=pred_anomalies,
            window=window,
            metric=metric,
        )
Aggregates the (sequence of) multivariate series given as input into one (sequence of)
        series and evaluates the results against the ground truth anomaly labels.

        Parameters
        ----------
        anomalies
            The (sequence of) binary ground truth anomaly labels (1 if it is an anomaly and 0 if not).
        series
            The (sequence of) predicted multivariate binary series to aggregate.
        window
            (Sequence of) integer value indicating the number of past samples each point
            represents in the (sequence of) series. The parameter will be used by the
            function `_window_adjustment_anomalies()` in darts.ad.utils to transform
            anomalies.
        metric
            The name of the metric function to use. Must be one of "recall", "precision", "f1", and "accuracy".
            Default: "recall".

        Returns
        -------
        Union[float, Sequence[float]]
            (Sequence of) score for the (sequence of) series.
        
darts/ad/aggregators/aggregators.py