human
I wrote the below code

    @wraps(func)
    def wrapper(self):
        path = tempfile.mktemp(prefix=func.__name__)
        os.mkdir(path)
        keep = False
        try:
            return func(self, path)
        except Exception:
            log.info('Test    %s.%s    failed,    output    is    at    %r\n', type(self).__name__, func.__name__, path)
            keep = True
            raise
        finally:
            gc.collect()
            if (not keep):
                rmtree(path)
    return wrapper

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def with_rw_directory(func):