from typing import Tuple


def calculate_asymmetric_level_ranges(
        num_bits: int,
        narrow_range: bool = False) -> Tuple[int, int, int]:
    """
    Calculates the numbers of the low and high quant and the number of
    quantization levels for the asymmetric quantization scheme.

    :param num_bits: The bitwidth of the quantization
    :param narrow_range: The flag specifying quantization range if it is True
        then [1; 2^num_bits - 1] and [0; 2^num_bits - 1] otherwise
    :return: A Tuple
        level_low - the low quant number
        level_high - the high quant number
        levels - the number of quantization levels
    """
    levels = 2 ** num_bits
    level_high = levels - 1
    level_low = 0

    if narrow_range:
        level_low = level_low + 1
        levels = levels - 1

    return level_low, level_high, levels