<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_sm_changed(self, model, prop_name, info):
 """Remove references to non-existing state machines"""

        for state_machine_id in list(self._expansion_state.keys()):
            if state_machine_id not in self.model.state_machines:
                del self._expansion_state[state_machine_id]