code: def get_user(self, user_id):
          
          if (hasattr(self, 'request') and
                  user_id == self.request.session["user_id"]):
              token = self.request.session['token']
              endpoint = self.request.session['region_endpoint']
              services_region = self.request.session['services_region']
              user = auth_user.create_user_from_token(self.request, token,
                                                      endpoint, services_region)
              return user
          else:
              return None
docs: Returns the current user from the session data.
  
          If authenticated, this return the user object based on the user ID
          and session data.
  
          .. note::
  
            This required monkey-patching the ``contrib.auth`` middleware
            to make the ``request`` object available to the auth backend class.