code: def save_imgs(results, imgs, save_dir="."):
      for i in range(results.shape[0]):
          result = get_pseudo_color_map(results[i])
          basename = imgs[i] + "val"
          basename = f"{basename}.png"
          if not os.path.exists(save_dir):
              os.mkdir(save_dir)
  
          result.save(os.path.join(save_dir, basename))
  
file_path: PaddleSeg/contrib/DomainAdaptation/utils/utils.py
imports: import paddle
  import os
  import cv2
  import imageio
  import numpy
  from paddleseg.utils import logger
  import PIL
label_desc: Use image node_id 5 for calling a global function with example usage: save_imgs(results, imgs, save_dir) without return types