def get_n_bits_from_range(quant_min: int, quant_max: int) -> int:
    """
    Returns quantization n_bits for given quantization range
    """
    n_bits = int(math.log2(quant_max + 1))
    if quant_min < 0:
        n_bits += 1

    return n_bits

    Returns quantization n_bits for given quantization range
    
coremltools/optimize/torch/quantization/_utils.py