human
I wrote the below code

    if (not login_url):
        from django.conf import settings
        login_url = settings.LOGIN_URL
    def decorator(view_func):
        def _wrapped_view(request, *args, **kwargs):
            if test_func(request.user):
                return view_func(request, *args, **kwargs)
            path = urlquote(request.get_full_path())
            tup = (login_url, redirect_field_name, path)
            return HttpResponseRedirect(('%s?%s=%s' % tup))
        return wraps(view_func, assigned=available_attrs(view_func))(_wrapped_view)
    return decorator

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

def user_passes_test(test_func, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME):