class_docstr: the class to get Pool info.
class_docstr_tok: ["the","class","to","get","Pool","info","."]
docstr: Delete pool by a given name.
docstr_tok: ["Delete","pool","by","a","given","name","."]
code: def delete_pool(name: str, session: Session = NEW_SESSION) -> Pool:
      """Delete pool by a given name."""
      if name == Pool.DEFAULT_POOL_NAME:
          raise AirflowException(
              f"{Pool.DEFAULT_POOL_NAME} cannot be deleted"
          )
  
      pool = session.scalar(select(Pool).filter_by(pool=name))
      if pool is None:
          raise PoolNotFound(f"Pool '{name}' doesn't exist")
  
      session.delete(pool)
      session.commit()
  
      return pool
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any
  from sqlalchemy import Boolean, Column, Integer, String, Text, func, select
  from airflow.exceptions import AirflowException, PoolNotFound
  from airflow.models.base import Base
  from airflow.ti_deps.dependencies_states import EXECUTION_STATES
  from airflow.typing_compat import TypedDict
  from airflow.utils.db import exists_query
  from airflow.utils.session import NEW_SESSION, provide_session
  from airflow.utils.sqlalchemy import nowait, with_row_locks
  from airflow.utils.state import TaskInstanceState
label_desc: Use image node_id 7 for calling the Pool obj's underlying member method code with example usage: obj.delete_pool(name, session) and returns: pool