human
I wrote the below code

    @wraps(method)
    def wrapped(*args, **kwargs):
        ret = method(*args, **kwargs)
        if ret[0]:
            if (len(ret) == 2):
                return ret[1]
            else:
                return ret[1:]
        else:
            if exc_type:
                raise exc_type((exc_str or 'call    failed'))
            return fail_ret
    return wrapped

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

def strip_boolean_result(method, exc_type=None, exc_str=None, fail_ret=None):