code: def check(result, input, tile, ratio, angle):
      result = np.uint8(result)
      input = np.uint8(input)
      w = result.shape[1]
      h = result.shape[0]
      eps = 0.1
  
      # inside of squares should be black
      mask = np.uint8(1 - get_mask(w, h, tile, ratio, angle, -eps))
      result2 = cv2.bitwise_and(result, result, mask=mask)
      assert not np.any(result2)
  
      # outside of squares should be same as input
      mask = np.uint8(get_mask(w, h, tile, ratio, angle, eps))
      result2 = cv2.bitwise_and(result, result, mask=mask)
      input2 = cv2.bitwise_and(input, input, mask=mask)
      assert np.all(result2 == input2)
  
file_path: DALI/dali/test/python/operator_1/test_gridmask.py
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.fn
  import nvidia.dali.types
  import numpy
  import math
  import os
  import cv2
  import itertools
  from nose2.tools import params
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 4 for calling a global function with example usage: check(result, input, tile, ratio, angle) without return types