code: def get_file_list(
      img_file, end=("jpg", "png", "jpeg", "JPEG", "JPG", "bmp")
  ):
      imgs_lists = []
      if img_file is None or not os.path.exists(img_file):
          raise Exception(
              "not found any img file in {}".format(img_file)
          )
  
      if os.path.isfile(img_file) and img_file.split(".")[-1] in end:
          imgs_lists.append(img_file)
      elif os.path.isdir(img_file):
          for single_file in os.listdir(img_file):
              if single_file.split(".")[-1] in end:
                  imgs_lists.append(os.path.join(img_file, single_file))
      if len(imgs_lists) == 0:
          raise Exception(
              "not found any img file in {}".format(img_file)
          )
      return imgs_lists
  
file_path: insightface/recognition/arcface_paddle/tools/convert_image_bin.py
imports: import os
  import sys
  import argparse
  import cv2
  from datasets.kv_helper import read_img_from_bin
  from datasets.kv_helper import trans_img_to_bin
label_desc: Use image node_id 1 for calling a global function with example usage: get_file_list(img_file, end) and returns: imgs_lists