def METHOD_NAME(
    auth_header: Optional[str] = None,
    token: Optional[str] = None,
    cls: bool = False,
):
    """Logout and clear session.
    Parameters
    ----------
    auth_header : str, optional
        The authorization header, e.g. "Bearer <token>".
    token : str, optional
        The token to delete.
        In the terminal we want to delete the current session, so we use the user own token.
    cls : bool
        Clear the screen.
    """
    if cls:
        system_clear()
    if not auth_header or not token:
        return
    success = True
    r = Hub.delete_session(auth_header, token, base_url=Hub.BackendEnvironment.BASE_URL)
    if not r or r.status_code != 200:
        success = False
    if not Local.remove(SESSION_FILE_PATH):
        success = False
    if not Local.remove(HIST_FILE_PATH):
        success = False
    if not Local.remove(get_current_user().preferences.USER_ROUTINES_DIRECTORY / "hub"):
        success = False
    remove_log_handlers()
    set_default_user()
    setup_logging()
    plt.close("all")
    if success:
        console.print("[green]\nLogout successful.[/green]")