

def _ensure_from_validity(self, transitions):
    valid_transitions = list(filter((lambda transition: transition.is_valid_from(self._current_state_object)), transitions))
    if (len(valid_transitions) == 0):
        raise InvalidTransition(('Cannot %s from %s' % (transitions[0].event, transition.current_state)))
    return valid_transitions

dataset/ETHPy150Open pyinvoke/invoke/invoke/vendor/fluidity/machine.py StateMachine._ensure_from_validity/VarMisuse@62/88 `self`->`transition`