code: def get_color(label, color_map):
      color = color_map.get(label) if color_map else None
      color = (
          color
          if color
          else color_map.get(label.lower())
          if color_map and isinstance(label, str)
          else None
      )
      color = label_color_map.get(label) if not color else color
      if color is None:
          color = [random.randint(0, 255) for _ in range(3)]
          label_color_map[label] = color
      return color
  
imports: import random
  from typing import Any, Dict
label_desc: Use image node_id 1 for calling a global function with example usage: get_color(label, color_map) and returns: color