async def next_done(self):
        '''Returns the next completed task.  Returns None if no more tasks
        remain. A TaskGroup may also be used as an asynchronous iterator.
        '''
        if not self._done and self._pending:
            self._done_event.clear()
            await self._done_event.wait()
        if self._done:
            return self._done.popleft()
        return None
async def next_done ( self ) : if not self . _done and self . _pending : self . _done_event . clear ( ) await self . _done_event . wait ( ) if self . _done : return self . _done . popleft ( ) return None
Returns the next completed task.  Returns None if no more tasks
        remain. A TaskGroup may also be used as an asynchronous iterator.