code: def _unpack(self, data):
          
          msg_magic, msg_length, msg_type = self._unpack_header(data)
          msg_size = self._struct_header_size + msg_length
          # XXX: Message shouldn't be any longer than the data
          payload = data[self._struct_header_size:msg_size]
          return payload.decode('utf-8', 'replace')
docs: Unpacks the given byte string and parses the result from JSON.
          Returns None on failure and saves data into "self.buffer".