def fit(
        self,
        anomalies: Union[TimeSeries, Sequence[TimeSeries]],
        series: Union[TimeSeries, Sequence[TimeSeries]],
    ) -> Self:
        """Fit the aggregators on the (sequence of) multivariate binary anomaly series.

        If a list of series is given, they must have the same number of components.

        Parameters
        ----------
        anomalies
            The (sequence of) binary ground truth anomaly labels (1 if it is an anomaly and 0 if not).
        series
            The (sequence of) multivariate binary series (predicted labels) to aggregate.
        """
        pred_width = series2seq(series)[0].width
        series = _check_input(
            series,
            name="series",
            width_expected=pred_width,
            check_deterministic=True,
            check_binary=True,
            check_multivariate=True,
        )
        self.width_trained_on = pred_width

        anomalies = _check_input(
            anomalies,
            name="anomalies",
            width_expected=1,
            check_deterministic=True,
            check_binary=True,
            check_multivariate=False,
        )
        if len(anomalies) != len(series):
            raise_log(
                ValueError(
                    "`anomalies` and `series` must contain the same number of series."
                ),
                logger=logger,
            )
        anomalies_vals, series_vals = [], []
        for anom, pred_anom in zip(anomalies, series):
            anomalies_vals.append(anom.slice_intersect_values(pred_anom)[:, :, 0])
            series_vals.append(pred_anom.slice_intersect_values(anom)[:, :, 0])
        self._fit_core(anomalies_vals, series_vals)
        self._fit_called = True
        return self
Fit the aggregators on the (sequence of) multivariate binary anomaly series.

        If a list of series is given, they must have the same number of components.

        Parameters
        ----------
        anomalies
            The (sequence of) binary ground truth anomaly labels (1 if it is an anomaly and 0 if not).
        series
            The (sequence of) multivariate binary series (predicted labels) to aggregate.
        
darts/ad/aggregators/aggregators.py