code: def get_save_name(im_path, im_dir):
      """get the saved name"""
      if im_dir is not None:
          im_file = im_path.replace(im_dir, "")
      else:
          im_file = os.path.basename(im_path)
      if im_file[0] == "/":
          im_file = im_file[1:]
      return im_file
  
file_path: PaddleSeg/contrib/PanopticDeepLab/core/predict.py
imports: import os
  import math
  import cv2
  import numpy
  import paddle
  import paddleseg
  from paddleseg.utils import logger, progbar
  from core import infer
  import utils
label_desc: Use image node_id 3 for calling a global function with example usage: get_save_name(im_path, im_dir) and returns: im_file