code: def get_save_name(im_path, im_dir, suffix=".png"):
      """Get the saved name"""
      if im_dir is not None:
          im_file = im_path.replace(im_dir, "")
      else:
          im_file = osp.basename(im_path)
      if im_file[0] == "/":
          im_file = im_file[1:]
      if suffix is not None:
          im_file = osp.splitext(im_file)[0] + suffix
      return im_file
  
file_path: PaddleSeg/contrib/PanopticSeg/paddlepanseg/core/predict.py
imports: import os
  import os.path
  import math
  import numpy
  import paddle
  import paddleseg
  from paddleseg.utils import logger, progbar
  from PIL import Image
  from paddlepanseg.utils.visualize import visualize_instance, visualize_semantic, visualize_panoptic
  from paddlepanseg.cvlibs import build_info_dict
  from .None import infer
label_desc: Use image node_id 3 for calling a global function with example usage: get_save_name(im_path, im_dir, suffix) and returns: im_file