A scope opening an instance for its code (capture.output, with_png) ends it afterward, so it reads every use of it within its arguments, in the functions they call as well (capture.output(f()) reads what f prints).
capture.output
with_png
capture.output(f())
f
A scope opening an instance for its code (
capture.output,with_png) ends it afterward, so it reads every use of it within its arguments, in the functions they call as well (capture.output(f())reads whatfprints).