code: def set(self, value):
          
  
          if not isinstance(value, str_cls):
              raise TypeError(unwrap(
                  '''
                  %s value must be a unicode string, not %s
                  ''',
                  type_name(self),
                  type_name(value)
              ))
  
          self._native = value
  
          if self._map is not None:
              if value in self._reverse_map:
                  value = self._reverse_map[value]
  
          self.contents = b''
          first = None
          for index, part in enumerate(value.split('.')):
              part = int(part)
  
              # The first two parts are merged into a single byte
              if index == 0:
                  first = part
                  continue
              elif index == 1:
                  part = (first * 40) + part
  
              encoded_part = chr_cls(0x7F & part)
              part = part >> 7
              while part > 0:
                  encoded_part = chr_cls(0x80 | (0x7F & part)) + encoded_part
                  part = part >> 7
              self.contents += encoded_part
  
          self._header = None
          if self._trailer != b'':
              self._trailer = b''
docs: Sets the value of the object
  
          :param value:
              A unicode string. May be a dotted integer string, or if _map is
              provided, one of the mapped values.
  
          :raises:
              ValueError - when an invalid value is passed