class_docstr: Monitor for an output stream (stdout or stderr) of a child process.
  
  This class serves multiple purposes:
  - Collects output from the child process in a rolling buffer in the
    background, and makes it available in a thread-safe manner.
  - Causes the current process to exit when the child process closes the
    stream (i.e. when the child process exits).
class_docstr_tok: ["Monitor","for","an","output","stream","(","stdout","or","stderr",")","of","a","child","process",".","This","class","serves","multiple","purposes",":","-","Collects","output","from","the","child","process","in","a","rolling","buffer","in","the","background",",","and","makes","it","available","in","a","thread-safe","manner",".","-","Causes","the","current","process","to","exit","when","the","child","process","closes","the","stream","(","i.e",".","when","the","child","process","exits",")","."]
docstr: Return output recently collected from the child process.
  
  Currently, this is limited to the most recent 4KB.
docstr_tok: ["Return","output","recently","collected","from","the","child","process",".","Currently",",","this","is","limited","to","the","most","recent","4KB","."]
code: def to_bytes(self):
      """Return output recently collected from the child process.
  
      Currently, this is limited to the most recent 4KB.
      """
      return b"".join(self.output_deque)
  
imports: import argparse
  import collections
  import enum
  import os
  import signal
  import subprocess
  import sys
  import threading
  import traceback
  import psutil
  from fiftyone.service.ipc import IPCServer
label_desc: Use image node_id 3 for calling the ChildStreamMonitor obj's underlying member method code with example usage: obj.to_bytes() and returns: bytes