def get_state_machine_m(self, two_factor_check=True):
        """ Get respective state machine model

        Get a reference of the state machine model the state model belongs to. As long as the root state model
        has no direct reference to its state machine model the state machine manager model is checked respective model.

        :rtype: rafcon.gui.models.state_machine.StateMachineModel
        :return: respective state machine model
        """
        from rafcon.gui.singleton import state_machine_manager_model
        state_machine = self.state.get_state_machine()
        if state_machine:
            if state_machine.state_machine_id in state_machine_manager_model.state_machines:
                sm_m = state_machine_manager_model.state_machines[state_machine.state_machine_id]
                if not two_factor_check or sm_m.get_state_model_by_path(self.state.get_path()) is self:
                    return sm_m
                else:
                    logger.debug("State model requesting its state machine model parent seems to be obsolete. "
                                 "This is a hint to duplicated models and dirty coding")

        return None
def get_state_machine_m ( self , two_factor_check = True ) : from rafcon . gui . singleton import state_machine_manager_model state_machine = self . state . get_state_machine ( ) if state_machine : if state_machine . state_machine_id in state_machine_manager_model . state_machines : sm_m = state_machine_manager_model . state_machines [ state_machine . state_machine_id ] if not two_factor_check or sm_m . get_state_model_by_path ( self . state . get_path ( ) ) is self : return sm_m else : logger . debug ( "State model requesting its state machine model parent seems to be obsolete. " "This is a hint to duplicated models and dirty coding" ) return None
Get respective state machine model

        Get a reference of the state machine model the state model belongs to. As long as the root state model
        has no direct reference to its state machine model the state machine manager model is checked respective model.

        :rtype: rafcon.gui.models.state_machine.StateMachineModel
        :return: respective state machine model