class_docstr: Available events for :class:`_pool.Pool`.
  
  The methods here define the name of an event as well
  as the names of members that are passed to listener
  functions.
  
  e.g.::
  
      from sqlalchemy import event
  
      def my_on_checkout(dbapi_conn, connection_rec, connection_proxy):
          "handle an on checkout event"
  
      event.listen(Pool, 'checkout', my_on_checkout)
  
  In addition to accepting the :class:`_pool.Pool` class and
  :class:`_pool.Pool` instances, :class:`_events.PoolEvents` also accepts
  :class:`_engine.Engine` objects and the :class:`_engine.Engine` class as
  targets, which will be resolved to the ``.pool`` attribute of the
  given engine or the :class:`_pool.Pool` class::
  
      engine = create_engine("postgresql+psycopg2://scott:tiger@localhost/test")
  
      # will associate with engine.pool
      event.listen(engine, 'checkout', my_on_checkout)
class_docstr_tok: ["Available","events","for",":","class",":","`","_pool.Pool","`",".","The","methods","here","define","the","name","of","an","event","as","well","as","the","names","of","members","that","are","passed","to","listener","functions",".","e.g",".",":",":","from","sqlalchemy","import","event","def","my_on_checkout","(","dbapi_conn",",","connection_rec",",","connection_proxy",")",":","``","handle","an","on","checkout","event","''","event.listen","(","Pool",",","'checkout","'",",","my_on_checkout",")","In","addition","to","accepting","the",":","class",":","`","_pool.Pool","`","class","and",":","class",":","`","_pool.Pool","`","instances",",",":","class",":","`","_events.PoolEvents","`","also","accepts",":","class",":","`","_engine.Engine","`","objects","and","the",":","class",":","`","_engine.Engine","`","class","as","targets",",","which","will","be","resolved","to","the","``",".pool","``","attribute","of","the","given","engine","or","the",":","class",":","`","_pool.Pool","`","class",":",":","engine","=","create_engine","(","``","postgresql+psycopg2",":","\/\/scott",":","tiger","@","localhost\/test","''",")","#","will","associate","with","engine.pool","event.listen","(","engine",",","'checkout","'",",","my_on_checkout",")"]
docstr: Called when a DBAPI connection is "detached" from a pool.
  
  This event is emitted after the detach occurs.  The connection
  is no longer associated with the given connection record.
  
  :param dbapi_connection: a DBAPI connection.
   The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.
  
  :param connection_record: the :class:`.ConnectionPoolEntry` managing
   the DBAPI connection.
docstr_tok: ["Called","when","a","DBAPI","connection","is","``","detached","''","from","a","pool",".","This","event","is","emitted","after","the","detach","occurs",".","The","connection","is","no","longer","associated","with","the","given","connection","record",".",":","param","dbapi_connection",":","a","DBAPI","connection",".","The",":","attr",":","`",".ConnectionPoolEntry.dbapi_connection","`","attribute",".",":","param","connection_record",":","the",":","class",":","`",".ConnectionPoolEntry","`","managing","the","DBAPI","connection","."]
code: def detach(
      self,
      dbapi_connection: DBAPIConnection,
      connection_record: ConnectionPoolEntry,
  ) -> None:
      """Called when a DBAPI connection is "detached" from a pool.
  
      This event is emitted after the detach occurs.  The connection
      is no longer associated with the given connection record.
  
      :param dbapi_connection: a DBAPI connection.
       The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.
  
      :param connection_record: the :class:`.ConnectionPoolEntry` managing
       the DBAPI connection.
  
      """
  
imports: from __future__ import annotations
  import typing
  from typing import Any
  from typing import Optional
  from typing import Type
  from typing import Union
  from .base import ConnectionPoolEntry
  from .base import Pool
  from .base import PoolProxiedConnection
  from .base import PoolResetState
  from ..None import event
  from ..None import util
label_desc: Use image node_id 11 for calling the PoolEvents obj's underlying member method code with example usage: obj.detach(dbapi_connection, connection_record) without return types