async def __anext__(self):
        """Get the next value in the chain."""
        if not self._initialized:

            current_iterables, self._iterables = self._iterables, []
            for iterable in current_iterables:

                self._iterables.append((await aiter(iterable)))

            self._iterables = collections.deque(self._iterables)
            self._initialized = True
            self._current = self._iterables.popleft()

        while True:

            if not self._iterables and not self._current:

                raise StopAsyncIteration()

            try:

                return await anext(self._current)

            except StopAsyncIteration:

                self._current = None
                if self._iterables:

                    self._current = self._iterables.popleft()
async def __anext__ ( self ) : if not self . _initialized : current_iterables , self . _iterables = self . _iterables , [ ] for iterable in current_iterables : self . _iterables . append ( ( await aiter ( iterable ) ) ) self . _iterables = collections . deque ( self . _iterables ) self . _initialized = True self . _current = self . _iterables . popleft ( ) while True : if not self . _iterables and not self . _current : raise StopAsyncIteration ( ) try : return await anext ( self . _current ) except StopAsyncIteration : self . _current = None if self . _iterables : self . _current = self . _iterables . popleft ( )
Get the next value in the chain.