code: def create_colored_mask(
      mask: np.ndarray, num_classes: int, *args, **kwargs
  ) -> np.ndarray:
      """Create a colored mask with random colors"""
      colored_mask = np.ones(
          (mask.shape[0], mask.shape[1], 3), dtype=np.uint8
      )
      # 0 for background.
      random_hue = random.randint(1, num_classes)
  
      random_mask_color = hsv_to_rgb(
          (random_hue / num_classes, 0.75, 0.75)
      )
      colored_mask[..., :] = [int(c * 255.0) for c in random_mask_color]
      colored_mask *= mask[..., None]
      return colored_mask
  
file_path: ml-cvnets/utils/visualization_utils.py
imports: import copy
  import random
  import sys
  from typing import List, Optional
  from torch import Tensor
  import numpy
  from matplotlib.colors import hsv_to_rgb
  from torch import Tensor
  from utils import logger
  from utils.color_map import Colormap
label_desc: Use image node_id 2 for calling a global function with example usage: create_colored_mask(mask, num_classes) and returns: colored_mask