code: def _select_font_color(background):
      if background == "black":
          font_color = "white"
      elif background.startswith("#"):
          mean_val = np.mean(
              [
                  int("0x" + c)
                  for c in (
                      background[1:3],
                      background[3:5],
                      background[5:7],
                  )
              ]
          )
          if mean_val > 126:
              font_color = "black"
          else:
              font_color = "white"
  
      else:
          font_color = "black"
  
      return font_color
  
imports: import numpy
  import numba
  from warnings import warn
  import sklearn.decomposition
  import sklearn.cluster
  import sklearn.neighbors
  from matplotlib.patches import Patch
  from umap.utils import submatrix, average_nn_distance
  from bokeh.plotting import show
  from bokeh.plotting import output_file, output_notebook
  from bokeh.layouts import column
  from bokeh.models import CustomJS, TextInput
  from matplotlib.pyplot import show
  from warnings import warn
label_desc: Use image node_id 12 for calling a global function with example usage: _select_font_color(background) and returns: font_color