code: def reduce_by_max(x, n=2):
      out = x.copy()
      out[np.argsort(x)[:-n]] = 0
      return out
  
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: reduce_by_max(x, n) and returns: out