code: def ccontrast(
      r: int,
      g: int,
      b: int,
      dark: str = "#000000",
      light: str = "#ffffff",
      thresh: int = 186,
  ) -> str:
      return (
          dark
          if (r * 0.299 + g * 0.587 + b * 0.114) > thresh
          else light
      )
  
imports: from typing import List, Callable
  import matplotlib
  import matplotlib.pyplot
  from matplotlib.colors import rgb2hex
label_desc: Use image node_id 3 for calling a global function with example usage: ccontrast(r, g, b, dark, light, thresh) and returns: unknown