human
Here's a good function header given the following:
I wrote the below code

    connection = get_connection(using)
    if (connection.get_autocommit() or connection.in_atomic_block):
        return atomic(using, savepoint)
    else:
        def entering(using):
            pass
        def exiting(exc_type, using):
            set_dirty(using=using)
        return _transaction_func(entering, exiting, using)

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

def commit_on_success_unless_managed(using=None, savepoint=False):