code: def _save_imgs(results, imgs_path, save_dir):
      if not os.path.exists(save_dir):
          os.makedirs(save_dir)
      for i, result in enumerate(results):
          if result.ndim == 3:
              result = np.squeeze(result)
          result = get_pseudo_color_map(result)
          basename = os.path.basename(imgs_path[i])
          basename, _ = os.path.splitext(basename)
          basename = f"{basename}.png"
          save_path = os.path.join(save_dir, basename)
          result.save(save_path)
          print("Predicted image is saved in {}".format(save_path))
  
file_path: PaddleSeg/deploy/python/infer_onnx.py
imports: import argparse
  import os
  import numpy
  import cv2
  from paddleseg.transforms import Normalize, Compose
  from paddleseg.utils import get_image_list
  from paddleseg.utils.visualize import get_pseudo_color_map
  from onnxruntime import InferenceSession
label_desc: Use image node_id 2 for calling a global function with example usage: _save_imgs(results, imgs_path, save_dir) without return types