human
I wrote the below code

    def wrapper(f):
        def func_wrapper(*args, **kwargs):
            action = ('%(func)s' % {'func': getattr(f, '__name__', f)})
            for attempt in range(1, (max_attempts + 1)):
                try:
                    return f(*args, **kwargs)
                except oslo_messaging.MessagingException:
                    with excutils.save_and_reraise_exception(reraise=False) as ctxt:
                        LOG.warning(_LW('Failed    to    execute    %(action)s.    %(attempt)d    out    of    %(max_attempts)d'), {'attempt': attempt, 'max_attempts': max_attempts, 'action': action})
                        if (attempt == max_attempts):
                            ctxt.reraise = True
        return func_wrapper
    return wrapper

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

def _call_with_retry(max_attempts):