code: def apply_color_mask(image: np.ndarray, color: tuple):
      """
      Applies color mask to given input image.
      """
      r = np.zeros_like(image).astype(np.uint8)
      g = np.zeros_like(image).astype(np.uint8)
      b = np.zeros_like(image).astype(np.uint8)
  
      (r[image == 1], g[image == 1], b[image == 1]) = color
      colored_mask = np.stack([r, g, b], axis=2)
      return colored_mask
  
imports: import copy
  import os
  import random
  import time
  from typing import List, Optional, Union
  import cv2
  import numpy
  import requests
  from PIL import Image
  from sahi.utils.file import Path
label_desc: Use image node_id 7 for calling a global function with example usage: apply_color_mask(image, color) and returns: colored_mask