code: def get_factory(cls, _type):
      try:
          return next(
              cl for cl in cls.__subclasses__() if cl._type == _type
          )()
      except StopIteration:
          raise ValueError("Unknown factory type {}".format(_type))
  
file_path: elephas/elephas/parameter/factory.py
imports: from abc import ABC, abstractmethod
  from elephas.parameter import HttpClient, HttpServer, SocketClient, SocketServer
label_desc: Use image node_id 1 for calling the ClientServerFactory obj's underlying member method code with example usage: obj.get_factory(cls, _type) and returns: next