@contextlib.contextmanager
def tmpdir():
    tempdir = tempfile.mkdtemp()
    try:
        yield tempdir
    finally:
        rmtree(tempdir)
Contextmanager to create a temporary directory.  It will be cleaned up
dataset/ETHPy150Open pre-commit/pre-commit/pre_commit/util.py/tmpdir