def __next__(self):
<EOL>if self.finished:<EOL><INDENT>raise StopIteration<EOL><DEDENT>self.piper.tee_locks[self.i].acquire()<EOL>exception = True<EOL>try:<EOL><INDENT>result = next(self.piper.tees[self.i])<EOL>exception = False<EOL><DEDENT>except StopIteration as result:<EOL><INDENT>self.finished = True<EOL><DEDENT>except Exception as result:<EOL><INDENT>pass<EOL><DEDENT>if self.s == self.stride or self.finished:<EOL><INDENT>self.s = <NUM_LIT:1><EOL>self.piper.tee_locks[(self.i + <NUM_LIT:1>) % len(self.piper.tees)].release()<EOL><DEDENT>else:<EOL><INDENT>self.s += <NUM_LIT:1><EOL>self.piper.tee_locks[self.i].release()<EOL><DEDENT>if exception:<EOL><INDENT>raise result<EOL><DEDENT>else:<EOL><INDENT>return result<EOL><DEDENT>
(internal) returns the next result from the ``itertools.tee`` object for
the wrapped ``Piper`` instance or re-raises an ``Exception``.