code: def logout_view(self):
          
          """ Sign the user out."""
  
          # Send user_logged_out signal
          signals.user_logged_out.send(current_app._get_current_object(), user=current_user)
  
          # Use Flask-Login to sign out user
          logout_user()
  
          # Flash a system message
          flash(_('You have signed out successfully.'), 'success')
  
          # Redirect to logout_next endpoint or '/'
          safe_next_url = self._get_safe_next_url('next', self.USER_AFTER_LOGOUT_ENDPOINT)
          return redirect(safe_next_url)
docs: Process the logout link.