code: def test_image_data_generator_invalid_data():
      generator = image_data_generator.ImageDataGenerator(
          featurewise_center=True,
          samplewise_center=True,
          featurewise_std_normalization=True,
          samplewise_std_normalization=True,
          zca_whitening=True,
          data_format="channels_last",
      )
      # Test fit with invalid data
      with pytest.raises(ValueError):
          x = np.random.random((3, 10, 10))
          generator.fit(x)
  
      # Test flow with invalid data
      with pytest.raises(ValueError):
          x = np.random.random((32, 10, 10))
          generator.flow(np.arange(x.shape[0]))
  
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 5 for calling a global function with example usage: test_image_data_generator_invalid_data() without return types