code: def solarize(image, threshold=128):
      """
      Invert all pixel values above a threshold.
  
      :param image: The image to solarize.
      :param threshold: All pixels above this greyscale level are inverted.
      :return: An image.
      """
      lut = []
      for i in range(256):
          if i < threshold:
              lut.append(i)
          else:
              lut.append(255 - i)
      return _lut(image, lut)
  
imports: import functools
  import operator
  from .None import Image
  from ._util import isStringType
label_desc: Use image node_id 18 for calling a global function with example usage: solarize(image, threshold) and returns: _lut