@contextlib.contextmanager<EOL>def temp_file(content):
with tempfile.NamedTemporaryFile() as f:<EOL><INDENT>f.write(content.encode('<STR_LIT:utf8>'))<EOL>f.seek(<NUM_LIT:0>)<EOL>yield f.name<EOL><DEDENT>
Context manager that supplies a temporary file with given content.