class_docstr: A file like object that publishes the stream to a 0MQ PUB socket.
  
  Output is handed off to an IO Thread
class_docstr_tok: ["A","file","like","object","that","publishes","the","stream","to","a","0MQ","PUB","socket",".","Output","is","handed","off","to","an","IO","Thread"]
docstr: trigger actual zmq send
  
  send will happen in the background thread
code: def flush(self):
      """trigger actual zmq send
  
      send will happen in the background thread
      """
      if (
          self.pub_thread
          and self.pub_thread.thread is not None
          and self.pub_thread.thread.is_alive()
          and self.pub_thread.thread.ident
          != threading.current_thread().ident
      ):
          # request flush on the background thread
          self.pub_thread.schedule(self._flush)
          # wait for flush to actually get through, if we can.
          evt = threading.Event()
          self.pub_thread.schedule(evt.set)
          # and give a timeout to avoid
          if not evt.wait(self.flush_timeout):
              # write directly to __stderr__ instead of warning because
              # if this is happening sys.stderr may be the problem.
              print("IOStream.flush timed out", file=sys.__stderr__)
      else:
          self._flush()
  
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 11 for calling the OutStream obj's underlying member method code with example usage: obj.flush() without return types