code: def ptp(a, axis=None, out=None, keepdims=False):
      x = ivy.max(a, axis=axis, keepdims=keepdims)
      y = ivy.min(a, axis=axis, keepdims=keepdims)
      ret = ivy.subtract(x, y)
      return ret.astype(a.dtype, copy=False)
  
imports: import ivy
  from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back, handle_numpy_out
label_desc: Use image node_id 4 for calling a global function with example usage: ptp(a, axis, out, keepdims) and returns: ret