code: def download(img):
      if not os.path.exists(CACHE_DIR):
          os.makedirs(CACHE_DIR)
      while True:
          name = str(int(time.time()))
          tmp_name = os.path.join(CACHE_DIR, name + ".jpg")
          if not os.path.exists(tmp_name):
              break
          else:
              time.sleep(1)
      img.save(tmp_name, "png")
      return tmp_name
  
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 1 for calling a global function with example usage: download(img) and returns: tmp_name