class_docstr: The server maintains the port and hands off the requests to workers
  
  example of use:
  
  context = zmq.Context()
  with KnimeBridgeServer(
      context,
      "tcp://127.0.0.1:4000", # server address
      "inproc://Notify        # kill notify address
      ) as server:
      notify_socket = context.socket(zmq.PUB)
      notify_socket.bind("inproc://Notify")
      ....
      notify_socket.send("Stop")
class_docstr_tok: ["The","server","maintains","the","port","and","hands","off","the","requests","to","workers","example","of","use",":","context","=","zmq.Context","(",")","with","KnimeBridgeServer","(","context",",","``","tcp",":","\/\/127.0.0.1:4000","''",",","#","server","address","``","inproc",":","\/\/Notify","#","kill","notify","address",")","as","server",":","notify_socket","=","context.socket","(","zmq.PUB",")","notify_socket.bind","(","``","inproc",":","\/\/Notify","''",")","....","notify_socket.send","(","``","Stop","''",")"]
code: def run(self):
      try:
          LOGGER.info(
              "Binding Knime bridge server to %s" % self.address
          )
          self.socket = self.context.socket(zmq.REP)
          self.socket.bind(self.address)
          poller = zmq.Poller()
          poller.register(self.socket, flags=zmq.POLLIN)
          if self.notify_addr is not None:
              self.notify_socket = self.context.socket(zmq.SUB)
              self.notify_socket.setsockopt(zmq.SUBSCRIBE, "")
              self.notify_socket.connect(self.notify_addr)
              poller.register(self.notify_socket, flags=zmq.POLLIN)
          else:
              self.notify_socket = None
          start_socket = self.context.socket(zmq.PAIR)
          start_socket.connect(self.start_addr)
          start_socket.send("OK")
          start_socket.close()
          try:
              while True:
                  for socket, event in poller.poll(1):
                      if socket == self.notify_socket:
                          msg = self.notify_socket.recv_string()
                          if msg == self.stop_msg:
                              break
                      elif socket == self.socket:
                          msg = self.socket.recv_multipart(copy=False)
                          session_id_frame = msg.pop(0)
                          session_id = str(session_id_frame.bytes)
                          # should be None
                          wrapper = msg.pop(0)
                          message_type = msg.pop(0).bytes
                          if message_type not in self.dispatch:
                              self.raise_cellprofiler_exception(
                                  session_id,
                                  "Unhandled message type: %s"
                                  % message_type,
                              )
                          else:
                              try:
                                  self.dispatch[message_type](
                                      session_id, message_type, msg
                                  )
                              except Exception as e:
                                  LOGGER.warning(e)
                                  self.raise_cellprofiler_exception(
                                      session_id, e
                                  )
                  else:
                      continue
                  break
          finally:
              if self.notify_socket:
                  self.notify_socket.close()
              self.socket.close()
      except Exception as e:
          LOGGER.error("Could not bind Knime bridge server")
  
imports: import json
  import logging
  import threading
  import uuid
  from io import StringIO
  import numpy
  import zmq
  from cellprofiler_core.constants.measurement import GROUP_NUMBER, GROUP_INDEX, OBJECT_NUMBER, EXPERIMENT, MCA_AVAILABLE_POST_RUN, COLTYPE_FLOAT, COLTYPE_INTEGER, COLTYPE_VARCHAR, IMAGE_NUMBER
  from cellprofiler_core.constants.workspace import DISPOSITION_SKIP, DISPOSITION_CANCEL
  from cellprofiler_core.image import Image
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting.text import ImageName
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
label_desc: Use image node_id 5 for calling the KnimeBridgeServer obj's underlying member method code with example usage: obj.run() without return types