def test_mask_is_binary(datamodule: MVTecLOCO) -> None:
        """Test if the mask tensor is binary."""
        mask_tensor = datamodule.test_data[0].gt_mask
        if mask_tensor is not None:
            is_binary = (mask_tensor.eq(0) | mask_tensor.eq(1)).all()
            assert is_binary.item() is True
Test if the mask tensor is binary.
tests/unit/data/datamodule/image/test_mvtec_loco.py