<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def state_machine_selection_changed(self, state_machine_m, signal_name, signal_msg):
 """Notify tree view about state machine selection"""

        if self.CORE_ELEMENT_CLASS in signal_msg.arg.affected_core_element_classes:
            self.update_selection_sm_prior()