code: def test_grid_dropout_mask(image):
      mask = np.ones([256, 320], dtype=np.uint8)
      aug = A.GridDropout(p=1, mask_fill_value=0)
      result = aug(image=image, mask=mask)
      # with mask on ones and fill_value = 0 the sum of pixels is smaller
      assert result["image"].sum() < image.sum()
      assert result["image"].shape == image.shape
      assert result["mask"].sum() < mask.sum()
      assert result["mask"].shape == mask.shape
  
      # with mask of zeros and fill_value = 0 mask should not change
      mask = np.zeros([256, 320], dtype=np.uint8)
      aug = A.GridDropout(p=1, mask_fill_value=0)
      result = aug(image=image, mask=mask)
      assert result["image"].sum() < image.sum()
      assert np.all(result["mask"] == 0)
  
      # with mask mask_fill_value=100, mask sum is larger
      mask = np.random.randint(0, 10, [256, 320], np.uint8)
      aug = A.GridDropout(p=1, mask_fill_value=100)
      result = aug(image=image, mask=mask)
      assert result["image"].sum() < image.sum()
      assert result["mask"].sum() > mask.sum()
  
      # with mask mask_fill_value=None, mask is not changed
      mask = np.ones([256, 320], dtype=np.uint8)
      aug = A.GridDropout(p=1, mask_fill_value=None)
      result = aug(image=image, mask=mask)
      assert result["image"].sum() < image.sum()
      assert result["mask"].sum() == mask.sum()
  
imports: import random
  from functools import partial
  import cv2
  import numpy
  import pytest
  import albumentations
  import albumentations.augmentations.functional
  import albumentations.augmentations.geometric.functional
  from albumentations.augmentations.blur.functional import gaussian_blur
  from .utils import get_dual_transforms, get_image_only_transforms, get_transforms
label_desc: Use image node_id 29 for calling a global function with example usage: test_grid_dropout_mask(image) without return types