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/progress_stream.py
imports: from __future__ import annotations
  import logging
  from tlz import merge, valmap
  from dask.utils import key_split
  from distributed.core import coerce_to_address, connect
  from distributed.diagnostics.progress import AllProgress
  from distributed.utils import color_of
  from distributed.worker import dumps_function
label_desc: Use image node_id 4 for calling a global function with example usage: color_of_message(msg) and returns: color_of, str