code: def mid(self, value):
          
          if not isinstance(value, int) or value > 65536:
              raise AttributeError
          self._mid = value
docs: Sets the MID of the message.
  
          :type value: Integer
          :param value: the MID
          :raise AttributeError: if value is not int or cannot be represented on 16 bits.