def test_bounded_detector_performance_multivariate(self, config):
        """
        TODO: improve these tests to introduce some correlation between actual and detected anomalies
        """
        detector_cls, detector_kwargs, expected_values = config
        detector = detector_cls(**detector_kwargs)

        if isinstance(detector, FittableDetector):
            detector.fit(self.mts_train)
        binary_detection = detector.detect(self.mts_test)

        # output must have the same width as the input
        expected_width = self.mts_test.n_components
        assert binary_detection.width == expected_width
        for m_func in metric_func:
            assert (
                len(
                    detector.eval_metric(
                        self.mts_anomalies, self.mts_test, metric=m_func
                    )
                )
                == expected_width
            )

        # check number of anomalies detected in the first component
        assert (
            binary_detection["0"].sum(axis=0).all_values().flatten()[0]
            == expected_values["anomalies"][0]
        )
        # check number of anomalies detected in the second component
        assert (
            binary_detection["1"].sum(axis=0).all_values().flatten()[0]
            == expected_values["anomalies"][1]
        )

        # check each metric on each component of the series
        for m_func in metric_func:
            metric_vals = detector.eval_metric(
                self.mts_anomalies, self.mts_test, metric=m_func
            )
            assert np.abs(expected_values[m_func][0] - metric_vals[0]) < delta
            assert np.abs(expected_values[m_func][1] - metric_vals[1]) < delta

        TODO: improve these tests to introduce some correlation between actual and detected anomalies
        
darts/tests/ad/test_detectors.py