def _enum_to_int(value):
 try:
  return int(value)
 except (ValueError, TypeError):
  return value

def _enum_to_int ( value ) : try : return int ( value ) except ( ValueError , TypeError ) : return value
convert an intenum member to a numeric value .