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: thread-local event pipe for signaling events that should be processed in the thread
code: def _event_pipe(self):
      """thread-local event pipe for signaling events that should be processed in the thread"""
      try:
          event_pipe = self._local.event_pipe
      except AttributeError:
          # new thread, new event pipe
          ctx = self.socket.context
          event_pipe = ctx.socket(zmq.PUSH)
          event_pipe.linger = 0
          event_pipe.connect(self._event_interface)
          self._local.event_pipe = event_pipe
      return event_pipe
  
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 4 for calling the IOPubThread obj's underlying member method code with example usage: obj._event_pipe() and returns: event_pipe