@contextlib.contextmanager
def captured_output(stream_name):
    orig_stdout = getattr(sys, stream_name)
    setattr(sys, stream_name, utils.StringIO())
    try:
        yield getattr(sys, stream_name)
    finally:
        setattr(sys, stream_name, orig_stdout)
Set the 'resolution' uniform from the passed width and height
dataset/ETHPy150Open numba/numba/numba/tests/support.py/captured_output--crossover with--dataset/ETHPy150Open gasman/shortcrust/examples/plasma.py/PlasmaShader.set_resolution