code: def logout_user(self):
          
  
          for key in ('identity.name', 'identity.auth_type'):
              session.pop(key, None)
          _logout_user()
          identity_changed.send(app._get_current_object(),
                                identity=AnonymousIdentity())
docs: Logs out the current user and cleans up the remember me cookie (if any).
  
          Sends signal `identity_changed` (from flask_principal).
          Sends signal `user_logged_out` (from flask_login).