human
Complete this python program:
def auth(request):
assistant
#Here is the Python program you requested.

    """Returns context variables required by apps that use Django\s authentication
    system.
    If there is no \user\ attribute in the request, uses AnonymousUser (from
    django.contrib.auth).
    """
    def get_user():
        if hasattr(request, 'user'):
            return request.user
        else:
            from django.contrib.auth.models import AnonymousUser
            return AnonymousUser()
    return {'user': SimpleLazyObject(get_user), 'messages': messages.get_messages(request), 'perms': lazy((lambda : PermWrapper(get_user())), PermWrapper)()}