code: def calculate_scale_and_zero_point(
      self, inputs, data, min_value, max_value, requirement, vrange
  ):
      # Get scale and zero_point
      if requirement["restriction"] is None:
          scale = (
              (np.maximum(np.abs(max_value), np.abs(min_value)))
              * 2
              / (vrange[1] - vrange[0])
          )
          zero_point = np.zeros_like(scale)
      if requirement["restriction"] == Restriction.ZERO_POINT_TO_ZERO:
          scale = (
              (np.maximum(np.abs(max_value), np.abs(min_value)))
              * 2
              / (vrange[1] - vrange[0])
          )
          zero_point = np.zeros_like(scale)
      if requirement["restriction"] == Restriction.CONV_2D_BIAS:
          # scale = input0_scale * input1_scale[...]
          input0_tensor = self.get_tensor_by_index(inputs[0])
          input0_scale = input0_tensor["quantization"]["scale"]
          input1_tensor = self.get_tensor_by_index(inputs[1])
          input1_scale = input1_tensor["quantization"]["scale"]
          scale = np.array(input0_scale) * np.array(input1_scale)
          zero_point = np.zeros_like(scale)
      data_len = len(data.shape)
      scale_len = len(scale.shape)
      for _ in range(data_len - scale_len):
          if (
              requirement["granularity"]
              == QuantizeGranularity.PER_AXIS_DIM0
          ):
              scale = np.expand_dims(scale, -1)
              zero_point = np.expand_dims(zero_point, -1)
          if (
              requirement["granularity"]
              == QuantizeGranularity.PER_AXIS_DIM3
          ):
              scale = np.expand_dims(scale, 0)
              zero_point = np.expand_dims(zero_point, 0)
      return scale, zero_point
  
imports: import numpy
  import tensorflow
  import tqdm
label_desc: Use image node_id 9 for calling the QuantizationConverter obj's underlying member method code with example usage: obj.calculate_scale_and_zero_point(inputs, data, min_value, max_value, requirement, vrange) and returns: scale,  zero_point