human
Here's a good function header given the following:
I wrote the below code

    def decorator(func):
        def inner(request, *args, **kwargs):
            if_modified_since = request.META.get('HTTP_IF_MODIFIED_SINCE')
            if if_modified_since:
                if_modified_since = parse_http_date_safe(if_modified_since)
            if_none_match = request.META.get('HTTP_IF_NONE_MATCH')
            if_match = request.META.get('HTTP_IF_MATCH')
            if (if_none_match or if_match):
                try:
                    etags = parse_etags((if_none_match or if_match))
                except ValueError:
                    if_none_match = None
                    if_match = None
            if etag_func:
                res_etag = etag_func(request, *args, **kwargs)
            else:
                res_etag = None
            if last_modified_func:
                dt = last_modified_func(request, *args, **kwargs)
                if dt:
                    res_last_modified = timegm(dt.utctimetuple())
                else:
                    res_last_modified = None
            else:
                res_last_modified = None
            response = None
            if (not ((if_match and (if_modified_since or if_none_match)) or (if_match and if_none_match))):
                if ((if_none_match and ((res_etag in etags) or (('*' in etags) and res_etag))) and ((not if_modified_since) or (res_last_modified and if_modified_since and (res_last_modified <= if_modified_since)))):
                    if (request.method in ('GET', 'HEAD')):
                        response = HttpResponseNotModified()
                    else:
                        logger.warning(('Precondition    Failed:    %s' % request.path), extra={'status_code': 412, 'request': request})
                        response = HttpResponse(status=412)
                elif (if_match and (((not res_etag) and ('*' in etags)) or (res_etag and (res_etag not in etags)))):
                    logger.warning(('Precondition    Failed:    %s' % request.path), extra={'status_code': 412, 'request': request})
                 ...

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

def condition(etag_func=None, last_modified_func=None):