human
I wrote the below code

    if (caller is None):
        return functools.partial(repeat, condition=condition, times=times)
    if (isinstance(condition, bool) and (condition is False)):
        return caller
    elif callable(condition):
        if (condition() is False):
            return caller
    if inspect.isclass(caller):
        attrs = [n for n in dir(caller) if n.startswith('test_')]
        for attrname in attrs:
            try:
                function = getattr(caller, attrname)
                if ((not inspect.isfunction(function)) and (not inspect.ismethod(function))):
                    continue
                setattr(caller, attrname, repeat(caller=function, condition=condition, times=times))
            except Exception as exc:
                log.exception(exc)
                continue
        return caller
    @functools.wraps(caller)
    def wrap(cls):
        result = None
        for attempt in range(1, (times + 1)):
            log.info('%s    test    run    %d    of    %s    times', cls, attempt, times)
            caller(cls)
        return cls
    return wrap

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

def repeat(caller=None, condition=True, times=5):