code: def calculate_qmin_qmax(bits, dtype):
      if dtype == QuantDtype.INT:
          qmin, qmax = -(2 ** (bits - 1)) + 1, 2 ** (bits - 1) - 1
      elif dtype == QuantDtype.UINT:
          qmin, qmax = 0, 2**bits - 1
      else:
          raise TypeError(
              "Wrong quantization dtype, please make sure it is one of 'int' and 'uint'."
          )
      return qmin, qmax
  
file_path: nni/nni/compression/utils/quantization/utils.py
imports: import torch
  from nni.common.version import TORCH_VERSION
  from .literal import QuantDtype, QuantScheme, QuantType
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_qmin_qmax(bits, dtype) and returns: qmin,  qmax