def test_validate_gt_mask_invalid_type(self) -> None:
        """Test validation of a ground truth mask with invalid type."""
        with pytest.raises(TypeError, match="Mask must be a torch.Tensor"):
            self.validator.validate_gt_mask(np.random.default_rng().integers(0, 2, (224, 224)))
Test validation of a ground truth mask with invalid type.
tests/unit/data/validators/torch/test_image.py