parameters: (cls, value)
return_statement: return result
docstring: Obtain an enumeration instance from a numeric value.
docstring_summary: Obtain an enumeration instance from a numeric value.
docstring_tokens: Obtain an enumeration instance from a numeric value .
function: def from_value(cls, value):
          """Obtain an enumeration instance from a numeric value."""
          result = cls._value_map.get(value, None)
  
          if result is None:
              raise ValueError('Unknown %s: %d' % (cls.__name__,
                                                   value))
  
          return result
function_tokens: def from_value ( cls , value ) : result = cls . _value_map . get ( value , None ) if result is None : raise ValueError ( 'Unknown %s: %d' % ( cls . __name__ , value ) ) return result