human
Complete the below
def authenticated(f):

    ''''Decorator for authenticating with the Hub'
    '''
 ... Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    @wraps(f)
    def decorated(*args, **kwargs):
        cookie = request.cookies.get(auth.cookie_name)
        if cookie:
            user = auth.user_for_cookie(cookie)
        else:
            user = None
        if user:
            return f(user, *args, **kwargs)
        else:
            return redirect((auth.login_url + ('?next=%s' % quote(request.path))))
    return decorated