code: def is_image_file(filename: str) -> bool:
      """Determine whether the input file name is a valid image file name."""
      ext = os.path.splitext(filename)[-1].lower()
      return ext in [
          ".bmp",
          ".dib",
          ".png",
          ".jpg",
          ".jpeg",
          ".pbm",
          ".pgm",
          ".ppm",
          ".tif",
          ".tiff",
      ]
  
imports: import os
  from typing import Callable, Union, List, Tuple
  import cv2
  import paddle
  import PIL
  import numpy
  import paddle.nn.functional
  from scipy.sparse import csr_matrix
label_desc: Use image node_id 1 for calling a global function with example usage: is_image_file(filename) and returns: unknown