code: def test_image_data_generator_fit():
      generator = image_data_generator.ImageDataGenerator(
          featurewise_center=True,
          samplewise_center=True,
          featurewise_std_normalization=True,
          samplewise_std_normalization=True,
          zca_whitening=True,
          rotation_range=90.0,
          width_shift_range=0.1,
          height_shift_range=0.1,
          shear_range=0.5,
          zoom_range=(0.2, 0.2),
          channel_shift_range=0.0,
          brightness_range=(1, 5),
          fill_mode="nearest",
          cval=0.5,
          horizontal_flip=True,
          vertical_flip=True,
          interpolation_order=1,
          data_format="channels_last",
      )
      x = np.random.random((32, 10, 10, 3))
      generator.fit(x, augment=True)
      # Test grayscale
      x = np.random.random((32, 10, 10, 1))
      generator.fit(x)
      # Test RBG
      x = np.random.random((32, 10, 10, 3))
      generator.fit(x)
      # Test more samples than dims
      x = np.random.random((32, 4, 4, 1))
      generator.fit(x)
      generator = image_data_generator.ImageDataGenerator(
          featurewise_center=True,
          samplewise_center=True,
          featurewise_std_normalization=True,
          samplewise_std_normalization=True,
          zca_whitening=True,
          rotation_range=90.0,
          width_shift_range=0.1,
          height_shift_range=0.1,
          shear_range=0.5,
          zoom_range=(0.2, 0.2),
          channel_shift_range=0.0,
          brightness_range=(1, 5),
          fill_mode="nearest",
          cval=0.5,
          horizontal_flip=True,
          vertical_flip=True,
          interpolation_order=1,
          data_format="channels_first",
      )
      x = np.random.random((32, 10, 10, 3))
      generator.fit(x, augment=True)
      # Test grayscale
      x = np.random.random((32, 1, 10, 10))
      generator.fit(x)
      # Test RBG
      x = np.random.random((32, 3, 10, 10))
      generator.fit(x)
      # Test more samples than dims
      x = np.random.random((32, 1, 4, 4))
      generator.fit(x)
  
file_path: keras-preprocessing/tests/image/image_data_generator_test.py
imports: import numpy
  import pytest
  from PIL import Image
  from keras_preprocessing.image import image_data_generator, utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_image_data_generator_fit() without return types