human
I wrote the below code

    @functools.wraps(func)
    def _wrapper(session, *args, **kwargs):
        ret = None
        try:
            ret = func(session, *args, **kwargs)
            if session.dirty:
                session.commit()
        except Exception as e:
            LOG.error('Error    in    %s:    %s', func.__name__, e)
            if session.dirty:
                LOG.error('Do    rolling    back    %s    table', session.dirty[0].__tablename__)
                session.rollback()
        return ret
    return _wrapper

What's a good function header?

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

def sql_function(func):