coalesce stream output in the notebook...
coalesce stream output in the notebook
This merges consecutive outputs on one stream into a single output.
Essentially, it applies the same merging that we do visually to the content stored in the notebook document.
This results in a massive performance improvement in load-time and storage size
for notebooks that have many calls to `sys.stdout.flush()`.