code: def get_bg_img(bg_img_path, img_shape):
      if bg_img_path is None:
          bg = 255 * np.ones(img_shape)
      elif not os.path.exists(bg_img_path):
          raise Exception(
              "The --bg_img_path is not existed: {}".format(bg_img_path)
          )
      else:
          bg = cv2.imread(bg_img_path)
      return bg
  
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 2 for calling a global function with example usage: get_bg_img(bg_img_path, img_shape) and returns: bg