def next(self):
while True:<EOL><INDENT>try:<EOL><INDENT>return next(self._current)<EOL><DEDENT>except StopIteration:<EOL><INDENT>try:<EOL><INDENT>self._current = iter(self._chain.popleft())<EOL><DEDENT>except IndexError:<EOL><INDENT>raise StopIteration('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>
Returns next element from chain.

        More precisely, it returns the next element of the
        foremost iterator. If this iterator is empty it moves iteratively
        along the chain of available iterators to pick the new foremost one.

        Raises StopIteration if there are no elements left.