class_docstr: BaseParameterClient
  Parameter-server clients can do two things: retrieve the current parameters
  from the corresponding server, and send updates (`delta`) to the server.
class_docstr_tok: ["BaseParameterClient","Parameter-server","clients","can","do","two","things",":","retrieve","the","current","parameters","from","the","corresponding","server",",","and","send","updates","(","`","delta","`",")","to","the","server","."]
code: def get_client(cls, client_type: str, port: int = 4000):
      try:
          return next(
              cl
              for cl in cls.__subclasses__()
              if cl.client_type == client_type
          )(port)
      except StopIteration:
          raise ValueError(
              "Parameter server mode has to be either `http` or `socket`, "
              "got {}".format(client_type)
          )
  
imports: import abc
  import numpy
  import socket
  import pickle
  import urllib.request
  from ..utils.sockets import determine_master, send, receive
label_desc: Use image node_id 1 for calling the BaseParameterClient obj's underlying member method code with example usage: obj.get_client(cls, client_type, port) and returns: next