(self, _model, _machine, *args, **kwargs)
return res
Internal scope-adjusted trigger function called by the ``NestedEvent._trigger`` instance. This should not
        be called directly.
        Args:
            _model (object): The currently processed model
            _machine (HierarchicalMachine): The machine that should be used to process the event
            args and kwargs: Optional positional or named arguments that will
                be passed onto the EventData object, enabling arbitrary state
                information to be passed on to downstream triggered functions.
        Returns: boolean indicating whether or not a transition was
            successfully executed (True if successful, False if not).
Internal scope-adjusted trigger function called by the ``NestedEvent._trigger`` instance. This should not
        be called directly.
        Args:
            _model (object): The currently processed model
            _machine (HierarchicalMachine): The machine that should be used to process the event
            args and kwargs: Optional positional or named arguments that will
                be passed onto the EventData object, enabling arbitrary state
                information to be passed on to downstream triggered functions.
        Returns: boolean indicating whether or not a transition was
            successfully executed (True if successful, False if not).
Internal scope - adjusted trigger function called by the NestedEvent . _trigger instance . This should not be called directly . Args : _model ( object ) : The currently processed model _machine ( HierarchicalMachine ) : The machine that should be used to process the event args and kwargs : Optional positional or named arguments that will be passed onto the EventData object enabling arbitrary state information to be passed on to downstream triggered functions . Returns : boolean indicating whether or not a transition was successfully executed ( True if successful False if not ) .
def _trigger_scoped(self, _model, _machine, *args, **kwargs):
        """ Internal scope-adjusted trigger function called by the ``NestedEvent._trigger`` instance. This should not
        be called directly.
        Args:
            _model (object): The currently processed model
            _machine (HierarchicalMachine): The machine that should be used to process the event
            args and kwargs: Optional positional or named arguments that will
                be passed onto the EventData object, enabling arbitrary state
                information to be passed on to downstream triggered functions.
        Returns: boolean indicating whether or not a transition was
            successfully executed (True if successful, False if not).
        """
        state_tree = _machine._build_state_tree(getattr(_model, _machine.model_attribute), _machine.state_cls.separator)
        state_tree = reduce(dict.get, _machine.get_global_name(join=False), state_tree)
        ordered_states = _resolve_order(state_tree)
        done = set()
        res = None
        for state_path in ordered_states:
            state_name = _machine.state_cls.separator.join(state_path)
            if state_name not in done and state_name in self.transitions:
                state = _machine.get_state(state_name)
                event_data = EventData(state, self, _machine, _model, args=args, kwargs=kwargs)
                event_data.source_name = state_name
                event_data.source_path = copy.copy(state_path)
                res = self._process(event_data)
                if res:
                    elems = state_path
                    while elems:
                        done.add(_machine.state_cls.separator.join(elems))
                        elems.pop()
        return res
def _trigger_scoped ( self , _model , _machine , * args , * * kwargs ) : state_tree = _machine . _build_state_tree ( getattr ( _model , _machine . model_attribute ) , _machine . state_cls . separator ) state_tree = reduce ( dict . get , _machine . get_global_name ( join = False ) , state_tree ) ordered_states = _resolve_order ( state_tree ) done = set ( ) res = None for state_path in ordered_states : state_name = _machine . state_cls . separator . join ( state_path ) if state_name not in done and state_name in self . transitions : state = _machine . get_state ( state_name ) event_data = EventData ( state , self , _machine , _model , args = args , kwargs = kwargs ) event_data . source_name = state_name event_data . source_path = copy . copy ( state_path ) res = self . _process ( event_data ) if res : elems = state_path while elems : done . add ( _machine . state_cls . separator . join ( elems ) ) elems . pop ( ) return res