code: def seg_image(args):
      assert os.path.exists(
          args.img_path
      ), "The --img_path is not existed: {}.".format(args.img_path)
  
      logger.info("Input: image")
      logger.info("Create predictor...")
      predictor = Predictor(args)
  
      logger.info("Start predicting...")
      img = cv2.imread(args.img_path)
      bg_img = get_bg_img(args.bg_img_path, img.shape)
      out_img = predictor.run(img, bg_img)
      cv2.imwrite(args.save_dir, out_img)
  
file_path: PaddleSeg/contrib/PP-HumanSeg/src/seg_demo.py
imports: import argparse
  import os
  import sys
  import cv2
  import numpy
  from tqdm import tqdm
  from paddleseg.utils import get_sys_env, logger, get_image_list
  from infer import Predictor
label_desc: Use image node_id 4 for calling a global function with example usage: seg_image(args) without return types