<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def waitForAllConnectionsToClose(self):
 """ Wait for all currently-open connections to enter the 'CLOSED' state. Currently this is only usable from test fixtures. """

        if not self._connections:
            return self._stop()
        return self._allConnectionsClosed.deferred().addBoth(self._stop)