@contextlib.contextmanager<EOL>def mkdtemp(*args, **kwargs):
remove = kwargs.pop('<STR_LIT>', True)<EOL>path = tempfile.mkdtemp(*args, **kwargs)<EOL>try:<EOL><INDENT>yield path<EOL><DEDENT>finally:<EOL><INDENT>if remove:<EOL><INDENT>shutil.rmtree(path)<EOL><DEDENT><DEDENT>
Create a temporary directory in a with-context

    keyword remove: Remove the directory when leaving the
    context if True. Default is True.
    other keywords arguments are given to the tempfile.mkdtemp
    function.