class_docstr: A simple class that receives messages on a SUB socket, as published
  by subclasses of `zmq.log.handlers.PUBHandler`, and logs them itself.
  
  This can subscribe to multiple topics, but defaults to all topics.
class_docstr_tok: ["A","simple","class","that","receives","messages","on","a","SUB","socket",",","as","published","by","subclasses","of","`","zmq.log.handlers.PUBHandler","`",",","and","logs","them","itself",".","This","can","subscribe","to","multiple","topics",",","but","defaults","to","all","topics","."]
docstr: Update our SUB socket's subscriptions.
docstr_tok: ["Update","our","SUB","socket","'s","subscriptions","."]
code: def subscribe(self):
      """Update our SUB socket's subscriptions."""
      self.stream.setsockopt(zmq.UNSUBSCRIBE, "")
      if "" in self.topics:
          self.log.debug("Subscribing to: everything")
          self.stream.setsockopt(zmq.SUBSCRIBE, "")
      else:
          for topic in self.topics:
              self.log.debug("Subscribing to: %r" % (topic))
              self.stream.setsockopt(zmq.SUBSCRIBE, topic)
  
file_path: ipyparallel/ipyparallel/apps/logwatcher.py
imports: import logging
  import zmq
  from jupyter_client.localinterfaces import localhost
  from tornado import ioloop
  from traitlets import Instance, List, Unicode
  from traitlets.config.configurable import LoggingConfigurable
  from zmq.eventloop import zmqstream
label_desc: Use image node_id 7 for calling the LogWatcher obj's underlying member method code with example usage: obj.subscribe() without return types