class_docstr: Calculate color map for mapping segmentation result.
code: def __call__(self) -> np.ndarray:
      color_map = self.num_classes * [0, 0, 0]
      for i in range(0, self.num_classes):
          j = 0
          lab = i
          while lab:
              color_map[i * 3] |= ((lab >> 0) & 1) << (7 - j)
              color_map[i * 3 + 1] |= ((lab >> 1) & 1) << (7 - j)
              color_map[i * 3 + 2] |= ((lab >> 2) & 1) << (7 - j)
              j += 1
              lab >>= 3
      color_map = [
          color_map[i : i + 3] for i in range(0, len(color_map), 3)
      ]
      color_map = color_map[1:]
      return color_map
  
imports: import os
  import random
  from typing import Callable, Union, List, Tuple
  import cv2
  import numpy
  from PIL import Image
  import paddlehub.vision.functional
label_desc: Use image node_id 2 for calling the ColorMap obj's underlying member method code with example usage: obj.__call__() and returns: color_map