code: def finalize(self):
          '''
          Release all connections contained in the pool.
  
          .. note:: This should be called to cleanly shutdown the pool, i.e.
              on process exit.
          '''
          self._condition.acquire()
          try:
              if self._nconnections != len(self._pool):
                  warnings.warn('finalize() called with unreleased connections', RuntimeWarning, 2)
  
              while self._pool:
                  self._close(self._pool.pop().connection)
              self._nconnections = 0
          finally:
              self._condition.release(f finalize(self):
          '''
          Release all connections contained in the pool.
  
          .. note:: This should be called to cleanly shutdown the pool, i.e.
              on process exit.
          '''
          self._condition.acquire()
          try:
              if self._nconnections != len(self._pool):
                  warnings.warn('finalize() called with unreleased connections', RuntimeWarning, 2)
  
              while self._pool:
                  self._close(self._pool.pop().connection)
              self._nconnections = 0
          finally:
              self._condition.release()
docs: Release all connections contained in the pool.
  
          .. note:: This should be called to cleanly shutdown the pool, i.e.
              on process exit.