def get_user(request):
    try:
        user_id = request.session[auth.SESSION_KEY]
        backend_path = request.session[auth.BACKEND_SESSION_KEY]
        backend = auth.load_backend(backend_path)
        backend.request = request
        user = backend.get_user(user_id) or models.AnonymousUser()
    except __HOLE__:
        user = models.AnonymousUser()
    return user
dataset/ETHPy150Open openstack/django_openstack_auth/openstack_auth/utils.py/get_user