code: def brightness_func(img, factor):
      """
      same output as PIL.ImageEnhance.Contrast
      """
      table = (
          (np.arange(256, dtype=np.float32) * factor)
          .clip(0, 255)
          .astype(np.uint8)
      )
      out = table[img]
      return out
  
imports: import cv2
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: brightness_func(img, factor) and returns: out