code: def _cleanup(self):
          
          if self._cursor:
              LOGGER.debug('Closing the cursor on %s', self.pid)
              self._cursor.close()
              self._cursor = None
  
          if self._conn:
              LOGGER.debug('Freeing %s in the pool', self.pid)
              try:
                  pool.PoolManager.instance().free(self.pid, self._conn)
              except pool.ConnectionNotFoundError:
                  pass
              self._conn = None
docs: Remove the connection from the stack, closing out the cursor