def csrf(request):
    def _get_val():
        token = get_token(request)
        if token is None:
            # In order to be able to provide debugging info in the
            # case of misconfiguration, we use a sentinel value
            # instead of returning an empty dict.
            return 'NOTPROVIDED'
        else:
            return token
    _get_val = lazy(_get_val, str)

    return {'csrf_token': _get_val() }
Test that the parent nodes are validated properly
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/core/context_processors.py/csrf--crossover with--dataset/ETHPy150Open bayespy/bayespy/bayespy/inference/vmp/nodes/tests/test_take.py/TestTake.test_parent_validity