def is_bit_set(bitmask: int, bit: int) -> bool:
    """
    Check if Nth bit is set in a bitmask.
    :param bitmask:     The bitmask.
    :param bit:         Which bit to check.
    :returns:           True when bit is set in bitmask.
    """
    return (bitmask & (1 << bit)) != 0