code: def _parse_input(self, input):
      im_exts = ["jpg", "jpeg", "png", "bmp"]
      im_exts += [ext.upper() for ext in im_exts]
  
      if isinstance(input, (list, tuple)) and isinstance(input[0], str):
          input_type = "image"
          images = [
              image
              for image in input
              if any([image.endswith(ext) for ext in im_exts])
          ]
          assert len(images) > 0, "no image found"
          logger.info(
              "Found {} inference images in total.".format(len(images))
          )
          return images, input_type
  
      if osp.isdir(input):
          input_type = "image"
          logger.info(
              "Input path is directory, search the images automatically"
          )
          images = set()
          infer_dir = osp.abspath(input)
          for ext in im_exts:
              images.update(glob.glob("{}/*.{}".format(infer_dir, ext)))
          images = list(images)
          assert len(images) > 0, "no image found"
          logger.info(
              "Found {} inference images in total.".format(len(images))
          )
          return images, input_type
  
      logger.info("Input path is {}".format(input))
      input_ext = osp.splitext(input)[-1][1:]
      if input_ext in im_exts:
          input_type = "image"
          return [input], input_type
      raise ValueError("Unsupported input format: {}".format(input_ext))
  
file_path: PaddleSeg/contrib/QualityInspector/qinspector/apis/pipeline.py
imports: import glob
  import json
  import os
  import os.path
  from qinspector.cvlib.configs import ConfigParser
  from qinspector.cvlib.framework import Builder
  from qinspector.utils.logger import setup_logger
  from qinspector.utils.visualizer import show_result
label_desc: Use image node_id 2 for calling the Pipeline obj's underlying member method code with example usage: obj._parse_input(input) and returns: images,  input_type, images,  input_type, list,  input_type