def list_enabled_ln_feature_bits(features: int) -> tuple[int, ...]:
    """Returns a list of enabled feature bits. If both opt and req are set, only
    req will be included in the result."""
    all_enabled_bits = list_enabled_bits(features)
    single_feature_bits: set[int] = set()
    for bit in all_enabled_bits:
        if bit % 2 == 0:  # even bit, always added
            single_feature_bits.add(bit)
        elif bit - 1 not in single_feature_bits:
            # add if we haven't already added the corresponding req (even) bit
            single_feature_bits.add(bit)
    return tuple(sorted(single_feature_bits))
Returns a list of enabled feature bits. If both opt and req are set, only
    req will be included in the result.
electrum/lnutil.py