human
I wrote the below code

    def decorator(request, *args, **kwargs):
        group = get_object_or_404(Group, slug=kwargs['slug'])
        if request.user.is_anonymous():
            return HttpResponseRedirect(reverse('django.contrib.auth.views.login'))
        if GroupMember.objects.is_moderator(group, request.user):
            return function(request, *args, **kwargs)
        else:
            raise Http404
    return decorator

What's a good function header?

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

def moderator_required(function=None):