code: def _get_debug_color(key):
      global _debug_colors, _debug_ncolors, _debug_colormap
      try:
          import matplotlib.cm as cm
          import matplotlib.colors
      except ImportError:
          raise RuntimeError(_MATPLOTLIB_IMPORT_ERROR_MESSAGE)
      if _debug_colors is None:
          tab_norm = matplotlib.colors.Normalize(vmin=0, vmax=7)
          tab_scalarMap = cm.ScalarMappable(norm=tab_norm, cmap="Dark2")
          _debug_colors = [
              tab_scalarMap.to_rgba(x) for x in range(_debug_ncolors)
          ]
  
      if key not in _debug_colormap:
          color = _debug_colors[len(_debug_colormap) % _debug_ncolors]
          _debug_colormap[key] = color
      return _debug_colormap[key]
  
file_path: fairlearn/fairlearn/postprocessing/_plotting.py
imports: from sklearn.utils.validation import check_is_fitted
  from ._constants import _MATPLOTLIB_IMPORT_ERROR_MESSAGE
  from ._threshold_optimizer import ThresholdOptimizer
label_desc: Use image node_id 1 for calling a global function with example usage: _get_debug_color(key) and returns: _debug_colormap