def user_passes_test(test):
    def decorator(view_func):
        # decorator takes the view function, and returns the view wrapped in
        # a permission check

        @wraps(view_func)
        def wrapped_view_func(request, *args, **kwargs):
            if test(request.user):
                # permission check succeeds; run the view function as normal
                return view_func(request, *args, **kwargs)
            else:
                # permission check failed
                return permission_denied(request)

        return wrapped_view_func

    return decorator
Verify that the random numbers generated by GPU_mrg_uniform, in
dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailadmin/utils.py/user_passes_test--crossover with--dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sandbox/tests/test_rng_mrg.py/test_consistency_GPU_parallel