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: handle a pipe message from a subprocess
code: def _handle_pipe_msg(self, msg):
      """handle a pipe message from a subprocess"""
      if not self._pipe_flag or not self._is_master_process():
          return
      if msg[0] != self._pipe_uuid:
          print("Bad pipe message: %s", msg, file=sys.__stderr__)
          return
      self.send_multipart(msg[1:])
  
imports: import asyncio
  import atexit
  import io
  import os
  import sys
  import threading
  import traceback
  import warnings
  from binascii import b2a_hex
  from collections import deque
  from io import StringIO, TextIOBase
  from threading import local
  from typing import Any, Callable, Deque, Dict, Optional
  import zmq
  from jupyter_client.session import extract_header
  from tornado.ioloop import IOLoop
  from zmq.eventloop.zmqstream import ZMQStream
label_desc: Use image node_id 7 for calling the IOPubThread obj's underlying member method code with example usage: obj._handle_pipe_msg(msg) without return types