code: def Value(self, name):
      
      if name in self._enum_type.values_by_name:
        return self._enum_type.values_by_name[name].number
      raise ValueError('Enum %s has no value defined for name %s' % (
          self._enum_type.name, name))
docs: Returns the value coresponding to the given enum name.