docs: def _read_packet(self, packet_type=MysqlPacket):
          """Read an entire "mysql packet" in its entirety from the network
          and return a MysqlPacket type that represents the results.
          """
          buff = b''
          try:
              while True:
                  packet_header = yield self._stream.read_bytes(4)
                  if DEBUG: dump_packet(packet_header)
  
                  btrl, btrh, packet_number = struct.unpack('<HBB', packet_header)
                  bytes_to_read = btrl + (btrh << 16)
                  #TODO: check sequence id
                  recv_data = yield self._stream.read_bytes(bytes_to_read)
                  if DEBUG: dump_packet(recv_data)
                  buff += recv_data
                  if bytes_to_read < MAX_PACKET_LEN:
                      break
          except iostream.StreamClosedError as e:
              raise OperationalError(2006, "MySQL server has gone away (%s)" % (e,))
          packet = packet_type(buff, self.encoding)
          packet.check_error()
          raise gen.Return(packet)