code: def _check_image_file(path):
      img_end = {
          "jpg",
          "bmp",
          "png",
          "jpeg",
          "rgb",
          "tif",
          "tiff",
          "gif",
          "pdf",
      }
      return any([path.lower().endswith(e) for e in img_end])
  
imports: import json
  import pathlib
  import time
  import os
  import glob
  import cv2
  import yaml
  from typing import Mapping
  import matplotlib.pyplot
  import numpy
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
label_desc: Use image node_id 1 for calling a global function with example usage: _check_image_file(path) and returns: any