def logout(request, next_url=None):
    try:
        request.GET['next_url']
        next_url = request.GET['next_url']
    except Exception:
        pass
    
    if request.session.keys() in 'user':
        del request.session['user']
    
    if next_url:
        return HttpResponseRedirect(next_url)
    else:
        return HttpResponseRedirect('/')
dataset/ETHPy150Open bgolub/fftogo/django_ae_utils/auth/views.py/logout/swapped operands of `in`