(value, enum_klass)
Convert a numeric value to an IntEnum member.
    If it's not a known member, return the numeric value itself.
Convert a numeric value to an IntEnum member.
    If it's not a known member, return the numeric value itself.
Convert a numeric value to an IntEnum member . If it s not a known member return the numeric value itself .
def _int_to_enum(value, enum_klass):
    """Convert a numeric value to an IntEnum member.
    If it's not a known member, return the numeric value itself.
    """
    try:
        return enum_klass(value)
    except ValueError:
        return value
def _int_to_enum ( value , enum_klass ) : try : return enum_klass ( value ) except ValueError : return value