code: def is_logged_in(self, name_id):
          
          identity = self.users.get_identity(name_id)[0]
          return bool(identity)
docs: Check if user is in the cache
  
          :param name_id: The identifier of the subject