

def _with_temp_file(func):
    import tempfile
    f = tempfile.NamedTemporaryFile()
    try:
        func(f)
    finally:
        f.close()

dataset/ETHPy150Open bokeh/bokeh/bokeh/application/handlers/tests/test_script.py _with_temp_file/original