code: def clamp(i, offset, maxval):
      j = max(0, i + offset)
      return min(j, maxval)
  
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: clamp(i, offset, maxval) and returns: min