code: def test_dataframe_iterator_class_mode_input(all_test_images, tmpdir):
      # save the images in the paths
      count = 0
      filenames = []
      for test_images in all_test_images:
          for im in test_images:
              filename = "image-{}.png".format(count)
              im.save(str(tmpdir / filename))
              filenames.append(filename)
              count += 1
      df = pd.DataFrame({"filename": filenames})
      generator = image_data_generator.ImageDataGenerator()
      df_autoencoder_iterator = generator.flow_from_dataframe(
          df,
          str(tmpdir),
          x_col="filename",
          y_col=None,
          class_mode="input",
      )
  
      batch = next(df_autoencoder_iterator)
  
      # check if input and output have the same shape and they're the same
      assert np.allclose(batch[0], batch[1])
      # check if the input and output images are not the same numpy array
      input_img = batch[0][0]
      output_img = batch[1][0]
      output_img[0][0][0] += 1
      assert input_img[0][0][0] != output_img[0][0][0]
  
      df_autoencoder_iterator = generator.flow_from_dataframe(
          df,
          str(tmpdir),
          x_col="filename",
          y_col="class",
          class_mode="input",
      )
  
      batch = next(df_autoencoder_iterator)
  
      # check if input and output have the same shape and they're the same
      assert batch[0].all() == batch[1].all()
      # check if the input and output images are not the same numpy array
      input_img = batch[0][0]
      output_img = batch[1][0]
      output_img[0][0][0] += 1
      assert input_img[0][0][0] != output_img[0][0][0]
  
imports: import os
  import random
  import shutil
  import numpy
  import pandas
  import pytest
  from PIL import Image
  from keras_preprocessing.image import dataframe_iterator, image_data_generator
label_desc: Use image node_id 5 for calling a global function with example usage: test_dataframe_iterator_class_mode_input(all_test_images, tmpdir) without return types