def test_thresholds_computed() -> None:
        """Test that both image and pixel threshold are computed correctly."""
        batch = ImageBatch(
            image=torch.rand(4, 3, 3, 3),
            anomaly_map=torch.tensor([[10, 20, 30], [40, 50, 60], [70, 80, 90]]),
            gt_mask=torch.tensor([[0, 0, 0], [0, 0, 0], [0, 1, 1]]),
            pred_score=torch.tensor([20, 40, 60, 80]),
            gt_label=torch.tensor([0, 0, 1, 1]),
        )
        pre_processor = PostProcessor()
        pre_processor.on_validation_batch_end(None, None, batch)
        pre_processor.on_validation_epoch_end(None, None)
        assert pre_processor.image_threshold == 60
        assert pre_processor.pixel_threshold == 80
Test that both image and pixel threshold are computed correctly.
tests/unit/post_processing/test_post_processor.py