code: def color_of_message(msg):
      if msg["status"] == "OK":
          split = key_split(msg["key"])
          return color_of(split)
      else:
          return "black"
  
file_path: distributed/distributed/diagnostics/task_stream.py
imports: from __future__ import annotations
  import logging
  from collections import deque
  import dask
  from dask.utils import format_time, key_split, parse_timedelta
  from distributed.diagnostics.plugin import SchedulerPlugin
  from distributed.diagnostics.progress_stream import color_of
  from distributed.metrics import time
label_desc: Use image node_id 2 for calling a global function with example usage: color_of_message(msg) and returns: color_of, str