code: def test_validate_filename(tmpdir):
      valid_extensions = ("png", "jpg")
      filename = tmpdir.ensure("test.png")
      assert utils.validate_filename(str(filename), valid_extensions)
  
      filename = tmpdir.ensure("test.PnG")
      assert utils.validate_filename(str(filename), valid_extensions)
  
      filename = tmpdir.ensure("test.some_extension")
      assert not utils.validate_filename(
          str(filename), valid_extensions
      )
      assert not utils.validate_filename(
          "some_test_file.png", valid_extensions
      )
  
file_path: keras-preprocessing/tests/image/utils_test.py
imports: import io
  import resource
  from pathlib import Path
  import numpy
  import PIL
  import pytest
  from keras_preprocessing.image import utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_validate_filename(tmpdir) without return types