code: def test_augment_images__random_values(self):
      colorizer = iaa.RandomColorsBinaryImageColorizer(
          color_true=255, color_false=0
      )
  
      image_single_chan = iarandom.RNG(1).integers(
          0, 255, size=(100, 100), dtype="uint8"
      )
      image = np.tile(image_single_chan[:, :, np.newaxis], (1, 1, 3))
  
      images_canny_uint8 = {}
      for thresh1, thresh2, ksize in itertools.product(
          [100], [200], [3, 5]
      ):
          if thresh1 > thresh2:
              continue
  
          image_canny = cv2.Canny(
              image,
              threshold1=thresh1,
              threshold2=thresh2,
              apertureSize=ksize,
              L2gradient=True,
          )
          image_canny_uint8 = np.tile(
              image_canny[:, :, np.newaxis], (1, 1, 3)
          )
  
          similar = 0
          for key, image_expected in images_canny_uint8.items():
              if np.array_equal(image_canny_uint8, image_expected):
                  similar += 1
          assert similar == 0
  
          images_canny_uint8[
              (thresh1, thresh2, ksize)
          ] = image_canny_uint8
  
      seen = {key: False for key in images_canny_uint8.keys()}
  
      for i in range(500):
          aug = iaa.Canny(
              alpha=1.0,
              hysteresis_thresholds=(
                  iap.Deterministic(100),
                  iap.Deterministic(200),
              ),
              sobel_kernel_size=[3, 5],
              colorizer=colorizer,
              seed=i,
          )
  
          image_aug = aug.augment_image(image)
          match_index = None
          for key, image_expected in images_canny_uint8.items():
              if np.array_equal(image_aug, image_expected):
                  match_index = key
                  break
          assert match_index is not None
          seen[match_index] = True
  
          assert len(seen.keys()) == len(images_canny_uint8.keys())
          if all(seen.values()):
              break
      assert np.all(seen.values())
  
imports: from __future__ import print_function, division, absolute_import
  import itertools
  import sys
  import numpy
  import cv2
  from imgaug import augmenters
  from imgaug import parameters
  from imgaug import random
  from imgaug.testutils import reseed, runtest_pickleable_uint8_img, is_parameter_instance, remove_prefetching
label_desc: Use image node_id 11 for calling the TestCanny obj's underlying member method code with example usage: obj.test_augment_images__random_values() without return types