human
I wrote the below code

    def decorator(view_func):
        def _wrapped_view(request, *args, **kwargs):
            user = request.user
            if user.is_authenticated():
                obj = _resolve_lookup(obj_lookup, kwargs)
                perm_obj = _resolve_lookup(perm_obj_lookup, kwargs)
                granted = access.has_perm_or_owns(user, perm, obj, perm_obj, owner_attr)
                if (granted or user.has_perm(perm)):
                    return view_func(request, *args, **kwargs)
            return HttpResponseForbidden()
        return wraps(view_func)(_wrapped_view)
    return decorator

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

def has_perm_or_owns_or_403(perm, owner_attr, obj_lookup, perm_obj_lookup, **kwargs):