@contextlib.contextmanager<EOL>def popen(*args, **kwargs):
process = subprocess.Popen(*args, **kwargs)<EOL>try:<EOL><INDENT>yield process.pid<EOL><DEDENT>finally:<EOL><INDENT>os.kill(process.pid, signal.SIGTERM)<EOL>os.waitpid(process.pid, <NUM_LIT:0>)<EOL><DEDENT>
Run a process in background in a `with` context. Parameters given
    to this function are passed to `subprocess.Popen`. Process is kill
    when exiting the context.