def logout(request):
    # Dispatch the signal before the user is logged out so the receivers have a
    # chance to find out *who* logged out.
    user = getattr(request, 'user', None)
    if hasattr(user, 'is_authenticated') and not user.is_authenticated():
        user = None
    user_logged_out.send(sender=user.__class__, request=request, user=user)

    request.session.flush()
    if hasattr(request, 'user'):
        from django.contrib.auth.models import AnonymousUser
        request.user = AnonymousUser()
Return slices of the :class:`AnalogSignalArrays` in the
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/auth/__init__.py/logout--crossover with--dataset/ETHPy150Open NeuralEnsemble/python-neo/neo/core/segment.py/Segment.take_slice_of_analogsignalarray_by_channelindex