code: def masks2pseudomap(masks):
      result = (
          np.ones(masks[0]["segmentation"].shape, dtype=np.uint8) * 255
      )
      for i, mask_data in enumerate(masks):
          result[mask_data["segmentation"] == 1] = i + 1
      pred_result = result
      result = get_pseudo_color_map(result)
      return pred_result, result
  
imports: import os
  import cv2
  import time
  import sys
  import argparse
  import paddle
  import paddle.nn.functional
  import numpy
  from PIL import Image, ImageDraw
  import matplotlib.pyplot
  from segment_anything import sam_model_registry, SamAutomaticMaskGenerator
  from segment_anything.modeling.clip_paddle import build_clip_model, _transform
  from segment_anything.utils.sample_tokenizer import tokenize
  from paddleseg.utils.visualize import get_pseudo_color_map, get_color_map_list
label_desc: Use image node_id 4 for calling a global function with example usage: masks2pseudomap(masks) and returns: pred_result,  result