code: def get_scale_zero_point(
      q_bits,
      is_symmetric_quant,
      max,
      min,
      absmax,
      scales=None,
      zero_points=None,
  ):
      q_range, q_max, q_min = get_q_props(q_bits)
  
      if is_symmetric_quant:
          scale = torch.empty_like(absmax)
          for i, x in enumerate(absmax):
              scale[i] = (
                  torch.ones_like(x) if x == 0 else q_range / (2 * x)
              )
          zero_point = torch.zeros(
              scale.shape,
              dtype=torch.float32,
              device=get_accelerator().device_name(),
          )
      else:
          scale = torch.empty_like(max)
          for i, x in enumerate(max):
              scale[i] = (
                  torch.ones_like(x)
                  if max[i] == min[i]
                  else q_range / (max[i] - min[i])
              )
          zero_point = q_min - (min * scale)
  
      return scale, zero_point
  
file_path: deepspeed/tests/unit/ops/quantizer/test_quantize.py
imports: import pytest
  import torch
  import deepspeed
  from deepspeed.ops.op_builder import QuantizerBuilder
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 4 for calling a global function with example usage: get_scale_zero_point(q_bits, is_symmetric_quant, max, min, absmax, scales, zero_points) and returns: scale,  zero_point