code: def solarize_add(img, add, thresh=128, **__):
      lut = []
      for i in range(256):
          if i < thresh:
              lut.append(min(255, i + add))
          else:
              lut.append(i)
      if img.mode in ("L", "RGB"):
          if img.mode == "RGB" and len(lut) == 256:
              lut = lut + lut + lut
          return img.point(lut)
      else:
          return img
  
imports: import math
  import random
  import re
  import numpy
  import PIL
  from classy_vision.dataset.transforms import register_transform
  from classy_vision.dataset.transforms.classy_transform import ClassyTransform
  from PIL import Image, ImageEnhance, ImageOps
label_desc: Use image node_id 14 for calling a global function with example usage: solarize_add(img, add, thresh) and returns: img, img