code: def set(self, value):
          
  
          if not isinstance(value, int_types) and not isinstance(value, str_cls):
              raise TypeError(unwrap(
                  '''
                  %s value must be an integer or a unicode string, not %s
                  ''',
                  type_name(self),
                  type_name(value)
              ))
  
          if isinstance(value, str_cls):
              if value not in self._reverse_map:
                  raise ValueError(unwrap(
                      '''
                      %s value "%s" is not a valid value
                      ''',
                      type_name(self),
                      value
                  ))
  
              value = self._reverse_map[value]
  
          elif value not in self._map:
              raise ValueError(unwrap(
                  '''
                  %s value %s is not a valid value
                  ''',
                  type_name(self),
                  value
              ))
  
          Integer.set(self, value)
docs: Sets the value of the object
  
          :param value:
              An integer or a unicode string from _map
  
          :raises:
              ValueError - when an invalid value is passed