human
Give me a Python program to print ("retry_on_failure(%s):    failed    on    attempt    '%d':" % (f given the following:
I wrote the below code

    def t(*args, **kwargs):
        for i in xrange(MAX_FAILURE_RETRY):
            try:
                ret_val = f(*args, **kwargs)
                return ret_val
            except Exception as e:
                print ("retry_on_failure(%s):    failed    on    attempt    '%d':" % (f.__name__, (i + 1)))
                print e
                excp_info = sys.exc_info()
                continue
        raise excp_info[0], excp_info[1], excp_info[2]
    return t

What's a good function header?
assistant
#Here is Python program to print ("retry_on_failure(%s):    failed    on    attempt    '%d':" % (f.

def retry_on_failure(f, *args, **kwargs):