<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def user_pass(self, func=None, location=None, **rkwargs):
 """Decorator ensures that user pass the given func."""

        def wrapper(view):
            view = to_coroutine(view)

            @functools.wraps(view)
            async def handler(request, *args, **kwargs):
                await self.check_user(request, func, location, **rkwargs)
                return await view(request, *args, **kwargs)
            return handler

        return wrapper