code: def test_dataframe_iterator_validate_filenames(
      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 + ["test.jpp", "test.jpg"]}
      )
      generator = image_data_generator.ImageDataGenerator()
      df_iterator = generator.flow_from_dataframe(
          df, str(tmpdir), class_mode="input"
      )
      assert len(df_iterator.filenames) == len(df["filename"]) - 2
      df_iterator = generator.flow_from_dataframe(
          df, str(tmpdir), class_mode="input", validate_filenames=False
      )
      assert len(df_iterator.filenames) == len(df["filename"])
  
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 3 for calling a global function with example usage: test_dataframe_iterator_validate_filenames(all_test_images, tmpdir) without return types