@contextmanager<EOL>def chdir(path):
cur_cwd = os.getcwd()<EOL>os.chdir(path)<EOL>try:<EOL><INDENT>yield<EOL><DEDENT>finally:<EOL><INDENT>os.chdir(cur_cwd)<EOL><DEDENT>
Change the working directory to `path` for the duration of this context
    manager.

    Args:
        path (str)