class_docstr: An object for sending IOPub messages in a background thread
  
  Prevents a blocking main thread from delaying output from threads.
  
  IOPubThread(pub_socket).background_socket is a Socket-API-providing object
  whose IO is always run in a thread.
class_docstr_tok: ["An","object","for","sending","IOPub","messages","in","a","background","thread","Prevents","a","blocking","main","thread","from","delaying","output","from","threads",".","IOPubThread","(","pub_socket",")",".background_socket","is","a","Socket-API-providing","object","whose","IO","is","always","run","in","a","thread","."]
docstr: Create the PULL socket listening for events that should fire in this thread.
code: def _setup_event_pipe(self):
      """Create the PULL socket listening for events that should fire in this thread."""
      ctx = self.socket.context
      pipe_in = ctx.socket(zmq.PULL)
      pipe_in.linger = 0
  
      _uuid = b2a_hex(os.urandom(16)).decode("ascii")
      iface = self._event_interface = "inproc://%s" % _uuid
      pipe_in.bind(iface)
      self._event_puller = ZMQStream(pipe_in, self.io_loop)
      self._event_puller.on_recv(self._handle_event)
  
imports: from __future__ import print_function
  import atexit
  from binascii import b2a_hex
  from collections import deque
  import os
  import sys
  import threading
  import warnings
  from io import StringIO, TextIOBase
  import zmq
  from zmq.eventloop.ioloop import IOLoop
  from zmq.eventloop.zmqstream import ZMQStream
  from jupyter_client.session import extract_header
  from ipython_genutils import py3compat
  from ipython_genutils.py3compat import unicode_type
label_desc: Use image node_id 3 for calling the IOPubThread obj's underlying member method code with example usage: obj._setup_event_pipe() without return types