code: def color_cast(img, offset):
      """Add a random value from [-offset, offset] to each channel"""
      x = np.asarray(img, dtype="uint8")
      x.flags.writeable = True
      cast_value = [0, 0, 0]
      for i in range(3):
          r = random.randint(0, 1)
          if r:
              cast_value[i] = random.randint(-offset, offset)
      for w in range(x.shape[0]):
          for h in range(x.shape[1]):
              for c in range(3):
                  if cast_value[c] == 0:
                      continue
                  v = x[w][h][c] + cast_value[c]
                  if v < 0:
                      v = 0
                  if v > 255:
                      v = 255
                  x[w][h][c] = v
      new_img = Image.fromarray(x.astype("uint8"), "RGB")
      return new_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 7 for calling a global function with example usage: color_cast(img, offset) and returns: new_img