@contextlib.contextmanager<EOL>def flush_stream_threads(process, out_formatter=None,<EOL>err_formatter=terminal.fg.red, size=<NUM_LIT:1>):
out = FlushStreamThread(process=process, stream_name="<STR_LIT>",<EOL>formatter=out_formatter, size=size)<EOL>err = FlushStreamThread(process=process, stream_name="<STR_LIT>",<EOL>formatter=err_formatter, size=size)<EOL>out.start()<EOL>err.start()<EOL>yield out, err<EOL>out.join()<EOL>err.join()<EOL>
Context manager that creates 2 threads, one for each standard
stream (stdout/stderr), updating in realtime the piped data.
The formatters are callables that receives manipulates the data,
e.g. coloring it before writing to a ``sys`` stream. See
``FlushStreamThread`` for more information.