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: Close the stream.
code: def close(self):
      """Close the stream."""
      if self._should_watch:
          self._should_watch = False
          # thread won't wake unless there's something to read
          # writing something after _should_watch will not be echoed
          os.write(self._original_stdstream_fd, b"\0")
          self.watch_fd_thread.join()
          # restore original FDs
          os.dup2(
              self._original_stdstream_copy, self._original_stdstream_fd
          )
          os.close(self._original_stdstream_copy)
      if self._exc:
          etype, value, tb = self._exc
          traceback.print_exception(etype, value, tb)
      self.pub_thread = None
  
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 8 for calling the OutStream obj's underlying member method code with example usage: obj.close() without return types