def get_effect_color(effect_protocol: type[Any]) -> str:
  """Gets the default color for a given effect (for treescope rendering)."""
  if effect_protocol in _EFFECT_COLORS:
    return _EFFECT_COLORS[effect_protocol]
  from treescope import formatting_util  # pylint: disable=import-outside-toplevel

  return formatting_util.color_from_string(effect_protocol.__qualname__)
Gets the default color for a given effect (for treescope rendering).
penzai/deprecated/v1/data_effects/effect_base.py