code: def pack(self):
      
      buf = np.zeros(512, dtype=np.uint8)
      packed_len = self._get_framed(buf, 0, self._copy_payload)
      d = buf[:packed_len]
      return d.tobytes()
docs: Pack to framed binary message.