human
I wrote the below code

    @functools.wraps(f)
    def wrapped(*args, **kwargs):
        while True:
            try:
                return f(*args, **kwargs)
            except db_exc.DBDeadlock:
                LOG.warn(_("Deadlock    detected    when    running    '%(func_name)s':    Retrying..."), dict(func_name=f.__name__))
                time.sleep(0.5)
                continue
    functools.update_wrapper(wrapped, f)
    return wrapped

What's a good function header?

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

def _retry_on_deadlock(f):