code: def quantize_int16(data):
      np_data = np.array(data).astype(float)
      max_val = max(abs(np_data.min()), abs(np_data.max()))
      scale = max_val / 2**15
      zero = 0
      output = np.clip(
          (np.round(zero + data / scale).astype(np.int32)),
          -(2**15),
          2**15 - 1,
      )
  
      quantized_data = QuantizedData()
      quantized_data.data = output
      quantized_data.scale = scale
      quantized_data.zero = zero
      quantized_data.minval = -max_val
      quantized_data.maxval = max_val
      return quantized_data
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import math
  from transform.base_converter import DeviceType
label_desc: Use image node_id 10 for calling a global function with example usage: quantize_int16(data) and returns: quantized_data