def METHOD_NAME(quant_mode):
  if isinstance(quant_mode, int):
    NndctScreenLogger().warning(
        f"quant_mode will not support integer value in future version. It supports string values 'calib' and 'test'."
    )
    qmode = quant_mode
  elif isinstance(quant_mode, str):
    if quant_mode == 'calib':
      qmode = 1
    elif quant_mode == 'test':
      qmode = 2
    else:
      NndctScreenLogger().error(
          f"quant_mode supported values are 'calib' and 'test'. Change it to 'calib' as calibration mode"
      )
      qmode = 1
  else:
    NndctScreenLogger().error(
        f"quant_mode supported values are string 'calib' and 'test'. Change it to 'calib' as calibration mode"
    )
    qmode = 1
  if NndctOption.nndct_quant_mode.value > 0:
    qmode = NndctOption.nndct_quant_mode.value
  if qmode == 1:
    NndctScreenLogger().info(f"Quantization calibration process start up...")
  elif qmode == 2:
    NndctScreenLogger().info(f"Quantization test process start up...")
  return qmode