human
I wrote the below code

    def _authenticated(method):
        @functools.wraps(method)
        def wrapper(self, *args, **kwargs):
            if (not self.current_user):
                if (self.request.method in ('GET', 'HEAD')):
                    url = self.get_login_url()
                    if ('?' not in url):
                        if urlparse.urlsplit(url).scheme:
                            next_url = self.request.full_url()
                        else:
                            next_url = self.request.uri
                        url += ('?' + urllib.urlencode(dict(next=next_url)))
                    self.redirect(url)
                    return
                raise web.HTTPError(401, 'You    are    not    logged    in.    Only    users    that    have    logged    in    can    access    this    page.')
            elif (isinstance(self.current_user, User) and (not allow_prospective) and (not self.current_user.IsRegistered())):
                raise web.HTTPError(403, 'You    are    not    a    registered    user.    Sign    up    for    Viewfinder    to    gain    access    to    this    page.')
            return method(self, *args, **kwargs)
        return wrapper
    return _authenticated

What's a good function header?

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

def authenticated(allow_prospective=False):