code: def _update_request_context_with_user(self, user=None):
          '''Store the given user as ctx.user.'''
  
          ctx = _request_ctx_stack.top
          ctx.user = self.anonymous_user() if user is None else usef _update_request_context_with_user(self, user=None):
          '''Store the given user as ctx.user.'''
  
          ctx = _request_ctx_stack.top
          ctx.user = self.anonymous_user() if user is None else user
docs: Store the given user as ctx.user.