<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_tab_close_clicked(self, event, state_m):
 """Triggered when the states-editor close button is clicked Closes the tab. :param state_m: The desired state model (the selected state) """

        [page, state_identifier] = self.find_page_of_state_m(state_m)
        if page:
            self.close_page(state_identifier, delete=False)