code: def random_color(rgb=False, maximum=255):
      """
      Args:
          rgb (bool): whether to return RGB colors or BGR colors.
          maximum (int): either 255 or 1
      Returns:
          ndarray: a vector of 3 numbers
      """
      idx = np.random.randint(0, len(_COLORS))
      ret = _COLORS[idx] * maximum
      if not rgb:
          ret = ret[::-1]
      return ret
  
imports: import colorsys
  import logging
  import math
  from enum import Enum, unique
  import numpy
  import matplotlib
  import matplotlib.colors
  import matplotlib.figure
  import torch
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from PIL import Image
  from ..data.registry.catalog import MetadataCatalog
  from ..data.structures import BitMasks, Boxes, BoxMode, Keypoints, PolygonMasks
label_desc: Use image node_id 3 for calling a global function with example usage: random_color(rgb, maximum) and returns: ret