def get_transition(self, input_symbol, state):
        '''This tells what the next state and action would be
        given the current state and the input_symbol.
        This returns (action, new state).
        This does not update the current state
        nor does it trigger the output action.
        If the transition is not defined and the default state is defined
        then that will be used; otherwise, this throws an exception.
        '''
        try:
            return self._transitions[(input_symbol, state)]
        except KeyError:
            try:
                return self._transitions[(ANY, state)]
            except KeyError:
                try:
                    return self._transitions[(SREType, state)]
                except KeyError:
                    # no expression matched, so check for default
                    if self.default_transition is not None:
                        return self.default_transition
                    else:
                        raise FSMError('Transition %r is undefined.' % (input_symbol,))
dataset/ETHPy150Open kdart/pycopia/core/pycopia/fsm.py/FSM.get_transition/original