code: def add(img, stateimg, channel, amount):
      """Add a given amount to a color channel of `stateimg`, and
      store the result in `img`.  Overflow is clipped.
  
      Parameters
      ----------
      img : (M, N, 3) ndarray of uint8
          Output image.
      stateimg : (M, N, 3) ndarray of uint8
          Input image.
      channel : int
          Channel (0 for "red", 1 for "green", 2 for "blue").
      amount : int
          Value to add.
  
      """
      height, width, _ = img.shape
      k = channel
      n = amount
  
      lut = [np.uint8()] * 256
  
      for l in range(256):
          op_result = l + n
          if op_result > 255:
              op_result = 255
          elif op_result < 0:
              op_result = 0
  
          lut[l] = np.uint8(op_result)
  
      for i in range(height):
          for j in range(width):
              img[i, j, k] = lut[stateimg[i, j, k]]
  
file_path: pythran/pythran/tests/scikit-image/_colormixer.py
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: add(img, stateimg, channel, amount) without return types