class_docstr: Client to register and await node reservations.
  
  Args:
    :server_addr: a tuple of (host, port) pointing to the Server.
docstr: Helper function to wrap msg w/ msg_type.
docstr_tok: ["Helper","function","to","wrap","msg","w\/","msg_type","."]
code: def _request(self, msg_type, msg_data=None):
      """Helper function to wrap msg w/ msg_type."""
      msg = {}
      msg["type"] = msg_type
      if msg_data:
          msg["data"] = msg_data
  
      done = False
      tries = 0
      while not done and tries < MAX_RETRIES:
          try:
              MessageSocket.send(self, self.sock, msg)
              done = True
          except socket.error as e:
              tries += 1
              if tries >= MAX_RETRIES:
                  raise
              print("Socket error: {}".format(e))
              self.sock.close()
              self.sock = socket.socket(
                  socket.AF_INET, socket.SOCK_STREAM
              )
              self.sock.connect(self.server_addr)
  
      logger.debug("sent: {0}".format(msg))
      resp = MessageSocket.receive(self, self.sock)
      logger.debug("received: {0}".format(resp))
      return resp
  
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 2 for calling the Client obj's underlying member method code with example usage: obj._request(msg_type, msg_data) and returns: resp