code: def should_use_black_text(background_color):
      return (
          background_color[0] * 0.299
          + background_color[1] * 0.587
          + background_color[2] * 0.114
      ) > 186
  
file_path: plotly.py/packages/python/plotly/plotly/figure_factory/_annotated_heatmap.py
imports: import plotly.colors
  from plotly import exceptions, optional_imports
  from plotly.figure_factory import utils
  from plotly.graph_objs import graph_objs
  from plotly.validators.heatmap import ColorscaleValidator
label_desc: Use image node_id 4 for calling a global function with example usage: should_use_black_text(background_color) and returns: unknown