code: def all_test_images():
      img_w = img_h = 20
      rgb_images = []
      rgba_images = []
      gray_images = []
      gray_images_16bit = []
      gray_images_32bit = []
      for n in range(8):
          bias = np.random.rand(img_w, img_h, 1) * 64
          variance = np.random.rand(img_w, img_h, 1) * (255 - 64)
          # RGB
          imarray = np.random.rand(img_w, img_h, 3) * variance + bias
          im = Image.fromarray(imarray.astype("uint8")).convert("RGB")
          rgb_images.append(im)
          # RGBA
          imarray = np.random.rand(img_w, img_h, 4) * variance + bias
          im = Image.fromarray(imarray.astype("uint8")).convert("RGBA")
          rgba_images.append(im)
          # 8-bit grayscale
          imarray = np.random.rand(img_w, img_h, 1) * variance + bias
          im = Image.fromarray(
              imarray.astype("uint8").squeeze()
          ).convert("L")
          gray_images.append(im)
          # 16-bit grayscale
          imarray = np.array(
              np.random.randint(-2147483648, 2147483647, (img_w, img_h))
          )
          im = Image.fromarray(imarray.astype("uint16"))
          gray_images_16bit.append(im)
          # 32-bit grayscale
          im = Image.fromarray(imarray.astype("uint32"))
          gray_images_32bit.append(im)
  
      return [
          rgb_images,
          rgba_images,
          gray_images,
          gray_images_16bit,
          gray_images_32bit,
      ]
  
file_path: keras-preprocessing/tests/image/directory_iterator_test.py
imports: import os
  import shutil
  import tempfile
  import numpy
  import pytest
  from PIL import Image
  from keras_preprocessing.image import image_data_generator
label_desc: Use image node_id 1 for calling a global function with example usage: all_test_images() and returns: list