code: def test_unusual_channel_numbers():
      reseed()
  
      images = [
          (0, create_random_images((4, 16, 16))),
          (1, create_random_images((4, 16, 16, 1))),
          (2, create_random_images((4, 16, 16, 2))),
          (4, create_random_images((4, 16, 16, 4))),
          (5, create_random_images((4, 16, 16, 5))),
          (10, create_random_images((4, 16, 16, 10))),
          (20, create_random_images((4, 16, 16, 20))),
      ]
  
      augs = [
          iaa.Add((-5, 5), name="Add"),
          iaa.AddElementwise((-5, 5), name="AddElementwise"),
          iaa.AdditiveGaussianNoise(
              0.01 * 255, name="AdditiveGaussianNoise"
          ),
          iaa.Multiply((0.95, 1.05), name="Multiply"),
          iaa.Dropout(0.01, name="Dropout"),
          iaa.CoarseDropout(0.01, size_px=6, name="CoarseDropout"),
          iaa.Invert(0.01, per_channel=True, name="Invert"),
          iaa.GaussianBlur(sigma=(0.95, 1.05), name="GaussianBlur"),
          iaa.AverageBlur((3, 5), name="AverageBlur"),
          iaa.MedianBlur((3, 5), name="MedianBlur"),
          iaa.Sharpen((0.0, 0.1), lightness=(1.0, 1.2), name="Sharpen"),
          iaa.Emboss(
              alpha=(0.0, 0.1), strength=(0.5, 1.5), name="Emboss"
          ),
          iaa.EdgeDetect(alpha=(0.0, 0.1), name="EdgeDetect"),
          iaa.DirectedEdgeDetect(
              alpha=(0.0, 0.1), direction=0, name="DirectedEdgeDetect"
          ),
          iaa.Fliplr(0.5, name="Fliplr"),
          iaa.Flipud(0.5, name="Flipud"),
          iaa.Affine(translate_px=(-5, 5), name="Affine-translate-px"),
          iaa.Affine(
              translate_percent=(-0.05, 0.05),
              name="Affine-translate-percent",
          ),
          iaa.Affine(rotate=(-20, 20), name="Affine-rotate"),
          iaa.Affine(shear=(-20, 20), name="Affine-shear"),
          iaa.Affine(scale=(0.9, 1.1), name="Affine-scale"),
          iaa.PiecewiseAffine(
              scale=(0.001, 0.005), name="PiecewiseAffine"
          ),
          iaa.PerspectiveTransform(
              scale=(0.01, 0.10), name="PerspectiveTransform"
          ),
          iaa.ElasticTransformation(
              alpha=(0.1, 0.2),
              sigma=(0.1, 0.2),
              name="ElasticTransformation",
          ),
          iaa.Sequential(
              [iaa.Add((-5, 5)), iaa.AddElementwise((-5, 5))]
          ),
          iaa.SomeOf(
              1, [iaa.Add((-5, 5)), iaa.AddElementwise((-5, 5))]
          ),
          iaa.OneOf([iaa.Add((-5, 5)), iaa.AddElementwise((-5, 5))]),
          iaa.Sometimes(0.5, iaa.Add((-5, 5)), name="Sometimes"),
          iaa.Identity(name="Noop"),
          iaa.BlendAlpha((0.0, 0.1), iaa.Add(10), name="BlendAlpha"),
          iaa.BlendAlphaElementwise(
              (0.0, 0.1), iaa.Add(10), name="BlendAlphaElementwise"
          ),
          iaa.BlendAlphaSimplexNoise(
              iaa.Add(10), name="BlendAlphaSimplexNoise"
          ),
          iaa.BlendAlphaFrequencyNoise(
              exponent=(-2, 2),
              foreground=iaa.Add(10),
              name="BlendAlphaSimplexNoise",
          ),
          iaa.Superpixels(p_replace=0.01, n_segments=64),
          iaa.Resize({"height": 4, "width": 4}, name="Resize"),
          iaa.CropAndPad(px=(-10, 10), name="CropAndPad"),
          iaa.Pad(px=(0, 10), name="Pad"),
          iaa.Crop(px=(0, 10), name="Crop"),
      ]
  
      for aug in augs:
          for nb_channels, images_c in images:
              if aug.name != "Resize":
                  images_aug = aug.augment_images(images_c)
                  assert images_aug.shape == images_c.shape
                  image_aug = aug.augment_image(images_c[0])
                  assert image_aug.shape == images_c[0].shape
              else:
                  images_aug = aug.augment_images(images_c)
                  image_aug = aug.augment_image(images_c[0])
                  if images_c.ndim == 3:
                      assert images_aug.shape == (4, 4, 4)
                      assert image_aug.shape == (4, 4)
                  else:
                      assert images_aug.shape == (
                          4,
                          4,
                          4,
                          images_c.shape[3],
                      )
                      assert image_aug.shape == (
                          4,
                          4,
                          images_c.shape[3],
                      )
  
file_path: imgaug/test/augmenters/test_mixed_files.py
imports: from __future__ import print_function, division, absolute_import
  import sys
  import numpy
  import skimage
  import skimage.data
  import six.moves
  import imgaug
  from imgaug import augmenters
  from imgaug.testutils import create_random_images, array_equal_lists, keypoints_equal, reseed, assertWarns
label_desc: Use image node_id 2 for calling a global function with example usage: test_unusual_channel_numbers() without return types