code: def enhance(img, scale):
      """Apply random enhancement for Color,Contrast,Brightness,Sharpness.
  
      Args:
          scale(float): enhancement degree is from [1-scale, 1+scale]
      """
      enhance_value = [1.0, 1.0, 1.0, 1.0]
      for i in range(4):
          r = random.randint(0, 1)
          if r:
              enhance_value[i] = random.uniform(1 - scale, 1 + scale)
      if not enhance_value[0] == 1.0:
          enhancer = ImageEnhance.Color(img)
          img = enhancer.enhance(enhance_value[0])
      if not enhance_value[1] == 1.0:
          enhancer = ImageEnhance.Contrast(img)
          img = enhancer.enhance(enhance_value[1])
      if not enhance_value[2] == 1.0:
          enhancer = ImageEnhance.Brightness(img)
          img = enhancer.enhance(enhance_value[2])
      if not enhance_value[3] == 1.0:
          enhancer = ImageEnhance.Sharpness(img)
          img = enhancer.enhance(enhance_value[3])
      return img
  
imports: from __future__ import division
  from builtins import range
  from builtins import object
  import random
  import numpy
  from PIL import Image, ImageEnhance
  import math
label_desc: Use image node_id 8 for calling a global function with example usage: enhance(img, scale) and returns: img