def __next__(self):
<EOL>if self.r == self.repeats:<EOL><INDENT>self.i = (self.i + <NUM_LIT:1>) % self.lenght<EOL>self.r = <NUM_LIT:0><EOL><DEDENT>self.r += <NUM_LIT:1><EOL>if self.stopping and self.i == <NUM_LIT:0> and self.r == <NUM_LIT:1>:<EOL><INDENT>self.stopped = True<EOL><DEDENT>if self.i == <NUM_LIT:0> and self.stopped:<EOL><INDENT>raise StopIteration<EOL><DEDENT>else:<EOL><INDENT>iterator = self.iterators[self.i]<EOL>return next(iterator)<EOL><DEDENT>
Returns the next element or raises ``StopIteration`` if stopped.