def op(self):
        try:
            _log.debug((("<" + self.name + ">") if self.name else "", str(self.elem_it)) % "Chain%s.next() Try %s")
            e = self.elem_it.next()
            _log.debug("Chain%s.next()=%s" % ((("<" + self.name + ">") if self.name else "", str(e))))
            return e
        except StopIteration:
            _log.debug("Chain%s.next() ELEM ITER STOP %s" % (("<" + self.name + ">") if self.name else "", str(self.elem_it)))
            try:
                self.elem_it = self.it.next()
            except StopIteration:
                _log.debug("Chain%s.next() ITER STOP %s" % (("<" + self.name + ">") if self.name else "", str(self.it)))
                raise StopIteration
            except PauseIteration:
                _log.debug("Chain%s.next() ITER PAUSE %s" % (("<" + self.name + ">") if self.name else "", str(self.it)))
                raise PauseIteration
            except Exception as e:
                _log.debug("Chain%s.next() ITER OTHER EXCEPTION %s" % (("<" + self.name + ">") if self.name else "", str(self.it)), exc_info=True)
                raise e
            _log.debug("Chain%s.next() New iterator %s" % (("<" + self.name + ">") if self.name else "", str(self.elem_it)))
            # when not exception try to take next from the latest list
            return self.op()
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/utilities/dynops.py/Chain.op/swapped operands of `%`