code: def check_image_with_pil(path):
      """
      Check if input file is an image
      """
      try:
          Image.open(path)
      except IOError:
          return False
      return True
  
label_desc: Use image node_id 2 for calling a global function with example usage: check_image_with_pil(path) and returns: True, False