class_docstr: Simple socket server with length-prefixed pickle messages.
  
  Args:
    :count: expected number of nodes in the cluster.
code: def _handle_message(self, sock, msg):
      logger.debug("received: {0}".format(msg))
      msg_type = msg["type"]
      if msg_type == "REG":
          self.reservations.add(msg["data"])
          MessageSocket.send(self, sock, "OK")
      elif msg_type == "QUERY":
          MessageSocket.send(self, sock, self.reservations.done())
      elif msg_type == "QINFO":
          rinfo = self.reservations.get()
          MessageSocket.send(self, sock, rinfo)
      elif msg_type == "STOP":
          logger.info("setting server.done")
          MessageSocket.send(self, sock, "OK")
          self.done = True
      else:
          MessageSocket.send(self, sock, "ERR")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import nested_scopes
  from __future__ import print_function
  import logging
  import os
  import pickle
  import select
  import socket
  import struct
  import sys
  import threading
  import time
  from .None import util
label_desc: Use image node_id 3 for calling the Server obj's underlying member method code with example usage: obj._handle_message(sock, msg) without return types