code: def reflect(pos, offset, bound):
      idx = pos + offset
      return min(2 * (bound - 1) - idx, max(idx, -idx))
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: reflect(pos, offset, bound) and returns: min