code: def quantize(ary, bits):
      maxval = float(np.max(np.absolute(ary)))
      scale = strip_mantissa(maxval) / float(1 << bits - 2)
      ary = np.around(ary * (1.0 / scale)).astype(np.int64)
      return ary, np.float32(scale)
  
imports: from __future__ import division
  import numpy
  from struct import pack, unpack
  from neon import logger
label_desc: Use image node_id 4 for calling a global function with example usage: quantize(ary, bits) and returns: ary,  np