code: def _savePalette(label, save_path):
      bin_colormap = np.random.randint(0, 255, (256, 3))  # 可视化的颜色
      bin_colormap[0, :] = [0, 0, 0]
      bin_colormap = bin_colormap.astype(np.uint8)
      visualimg = Image.fromarray(label, "P")
      palette = bin_colormap  # long palette of 768 items
      visualimg.putpalette(palette)
      visualimg.save(save_path, format="PNG")
  
file_path: PaddleSeg/EISeg/tool/semantic2instance.py
imports: import os
  import os.path
  import argparse
  from tqdm import tqdm
  import numpy
  import cv2
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: _savePalette(label, save_path) without return types