human
I wrote the below code

    def decorator(view_func):
        @functools.wraps(view_func, assigned=available_attrs(view_func))
        def _wrapped_view(request, *args, **kwargs):
            if is_authenticated(request.user):
                return view_func(request, *args, **kwargs)
            return handle_redirect_to_login(request, redirect_field_name=redirect_field_name, login_url=login_url)
        return _wrapped_view
    if func:
        return decorator(func)
    return decorator

What's a good function header?

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

def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):