def transition_to(self, new_state):
            if new_state in self.transitions[self._state] or self.disable_transition_checks:
                hook = self.hooks.get((self._state, new_state), None)
                if hook:
                    hook()
                self._state = new_state
            else:
                msg = (self, self.printable(new_state)) % "Invalid transition %s -> %s"
                if self.allow_invalid_transitions:
                    _log.warning("ALLOWING " + msg)
                    self._state = new_state
                else:
                    raise Exception(msg)
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actor/actor.py/Actor.FSM.transition_to/swapped operands of `%`