<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def notification_selected_sm_changed(self, model, prop_name, info):
 """If a new state machine is selected, make sure expansion state is stored and tree updated"""

        selected_state_machine_id = self.model.selected_state_machine_id
        if selected_state_machine_id is None:
            return
        self.update()