(enum_list, bitfield_enum_type)
return bitfield_value
Converts a list of enums to a bitfield value.

    Args:
        enum_list (List[enum.Enum]): Specifies the list of enums.
        bitfield_enum_type (enum.Enum): Specifies the bitfield enum type
            from which to mask and extract the enum values.
    Returns:
        int: Indicates the value of the bitfield.
Converts a list of enums to a bitfield value.
Converts a list of enums to a bitfield value .
def enum_list_to_bitfield(enum_list, bitfield_enum_type):
    """
    Converts a list of enums to a bitfield value.

    Args:
        enum_list (List[enum.Enum]): Specifies the list of enums.
        bitfield_enum_type (enum.Enum): Specifies the bitfield enum type
            from which to mask and extract the enum values.
    Returns:
        int: Indicates the value of the bitfield.
    """
    bitfield_value = 0
    for enum_value in enum_list:
        bitfield_mask = next(
            b for b in bitfield_enum_type if b.name == enum_value.name)
        bitfield_value |= bitfield_mask.value

    return bitfield_value
def enum_list_to_bitfield ( enum_list , bitfield_enum_type ) : bitfield_value = 0 for enum_value in enum_list : bitfield_mask = next ( b for b in bitfield_enum_type if b . name == enum_value . name ) bitfield_value |= bitfield_mask . value return bitfield_value