human
I wrote the below code

    def _outer(fun):
        @wraps(fun)
        def _inner(*args, **kwargs):
            _max_retries = kwargs.pop(u'exception_retry_count', max_retries)
            for retries in count(0):
                try:
                    return fun(*args, **kwargs)
                except Exception:
                    if (retries >= _max_retries):
                        raise
                    try:
                        rollback_unless_managed()
                    except Exception:
                        pass
        return _inner
    return _outer

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

def transaction_retry(max_retries=1):