<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_connection(self, connection):
 """Called by the connections themselves when they have been closed."""

        if not self._closing:
            self.connections.remove(connection)
            logger.debug("removed connection")