<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(self, connection):
 """Remove the connection from the pool :param connection: The connection to remove :type connection: psycopg2.extensions.connection :raises: ConnectionNotFoundError :raises: ConnectionBusyError """

        cid = id(connection)
        if cid not in self.connections:
            raise ConnectionNotFoundError(self.id, cid)
        self.connection_handle(connection).close()
        with self._lock:
            del self.connections[cid]
        LOGGER.debug('Pool %s removed connection %s', self.id, cid)