<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def release(self, connection):
        '''
        Return a connection back to the pool.

        Prior to release, :py:meth:`ctds.Connection.rollback()` is called to
        rollback any pending transaction.

        .. note:: This must be called once for every successful call to
            :py:meth:`.acquire()`.

        :param connection: The connection object returned by
            :py:meth:`.acquire()`.
        '''
        try:
            # Rollback the existing connection, closing on failure.
            connection.rollback()
        except self._dbapi2.Error:
            self._close(connection)
            return

        self._condition.acquire()
        try:
            if self._maxsize is None or self._maxsize > len(self._pool):
                self._pool.append(PooledConnection(connection, time.time()))
                self._condition.notify()
            else:
                self._close(connection)
        finally:
            self._condition.release()