<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_destruction(self, model, prop_name, info):
 """ Clean up when state machine is being destructed """

        if self.model is model:  # only used for the state machine destruction case
            self.canvas.get_view_for_model(self.root_state_m).remove()