code: def _measure_uniformity(cls, image, patch_size=5, n_patches=50):
      pshalf = (patch_size - 1) // 2
      image_f32 = image.astype(np.float32)
      grad_x = image_f32[:, 1:] - image_f32[:, :-1]
      grad_y = image_f32[1:, :] - image_f32[:-1, :]
      grad = np.abs(grad_x[1:, :] + grad_y[:, 1:])
      points_y = np.random.randint(0, image.shape[0], size=(n_patches,))
      points_x = np.random.randint(0, image.shape[0], size=(n_patches,))
      stds = []
      for y, x in zip(points_y, points_x):
          bb = ia.BoundingBox(
              x1=x - pshalf, y1=y - pshalf, x2=x + pshalf, y2=y + pshalf
          )
          patch = bb.extract_from_image(grad)
          stds.append(np.std(patch))
      return 1 / (1 + np.std(stds))
  
imports: from __future__ import print_function, division, absolute_import
  import sys
  import numpy
  import cv2
  import imgaug
  from imgaug import augmenters
  from imgaug import parameters
  from imgaug.testutils import reseed, runtest_pickleable_uint8_img, is_parameter_instance
label_desc: Use image node_id 8 for calling the TestSnowflakes obj's underlying member method code with example usage: obj._measure_uniformity(cls, image, patch_size, n_patches) and returns: unknown