code: def draw_with_blend_and_clicks(
      img,
      mask=None,
      alpha=0.6,
      clicks_list=None,
      pos_color=(0, 255, 0),
      neg_color=(255, 0, 0),
      radius=4,
      palette=None,
  ):
      result = img.copy()
  
      if mask is not None:
          if not palette:
              palette = get_palette(np.max(mask) + 1)
          palette = np.array(palette)
          rgb_mask = palette[mask.astype(np.uint8)]
  
          mask_region = (mask > 0).astype(np.uint8)
          result = (
              result * (1 - mask_region[:, :, np.newaxis])
              + (1 - alpha) * mask_region[:, :, np.newaxis] * result
              + alpha * rgb_mask
          )
          result = result.astype(np.uint8)
  
      if clicks_list is not None and len(clicks_list) > 0:
          pos_points = [
              click.coords for click in clicks_list if click.is_positive
          ]
          neg_points = [
              click.coords
              for click in clicks_list
              if not click.is_positive
          ]
  
          result = draw_points(
              result, pos_points, pos_color, radius=radius
          )
          result = draw_points(
              result, neg_points, neg_color, radius=radius
          )
  
      return result
  
file_path: PaddleSeg/EISeg/eiseg/util/vis.py
imports: from functools import lru_cache
  import cv2
  import numpy
label_desc: Use image node_id 10 for calling a global function with example usage: draw_with_blend_and_clicks(img, mask, alpha, clicks_list, pos_color, neg_color, radius, palette) and returns: result