def __init_subclass__(cls, **kwargs) -> None:
        """Check that subclass implements torchmetrics.Metric interface."""
        del kwargs
        assert issubclass(
            cls,
            (Metric | MetricCollection),
        ), "AnomalibMetric must be a subclass of torchmetrics.Metric or torchmetrics.MetricCollection"
Check that subclass implements torchmetrics.Metric interface.
src/anomalib/metrics/base.py