def remove_connection(cls, pid, connection):
        """Remove a connection from the pool, closing it if is open.

        :param str pid: The pool ID
        :param connection: The connection to remove
        :type connection: psycopg2.extensions.connection
        :raises: ConnectionNotFoundError

        """
        cls._ensure_pool_exists(pid)
        cls._pools[pid].remove(connection)
def remove_connection ( cls , pid , connection ) : cls . _ensure_pool_exists ( pid ) cls . _pools [ pid ] . remove ( connection )
Remove a connection from the pool, closing it if is open.

        :param str pid: The pool ID
        :param connection: The connection to remove
        :type connection: psycopg2.extensions.connection
        :raises: ConnectionNotFoundError