def with_temp_dir(f):
@wraps(f)<EOL>def wrapped(*args, **kwargs):<EOL><INDENT>with TemporaryDirectory() as temp_dir:<EOL><INDENT>return f(*args, temp_dir=temp_dir, **kwargs)<EOL><DEDENT><DEDENT>return wrapped<EOL>
A wrapper that creates and deletes a temporary directory.