<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_state_machine_tab_label(self, state_machine_m):
 """ Updates tab label if needed because system path, root state name or marked_dirty flag changed :param StateMachineModel state_machine_m: State machine model that has changed :return: """

        sm_id = state_machine_m.state_machine.state_machine_id
        if sm_id in self.tabs:
            sm = state_machine_m.state_machine
            # create new tab label if tab label properties are not up to date
            if not self.tabs[sm_id]['marked_dirty'] == sm.marked_dirty or \
                    not self.tabs[sm_id]['file_system_path'] == sm.file_system_path or \
                    not self.tabs[sm_id]['root_state_name'] == sm.root_state.name:

                label = self.view["notebook"].get_tab_label(self.tabs[sm_id]["page"]).get_child().get_children()[0]
                set_tab_label_texts(label, state_machine_m, unsaved_changes=sm.marked_dirty)

                self.tabs[sm_id]['file_system_path'] = sm.file_system_path
                self.tabs[sm_id]['marked_dirty'] = sm.marked_dirty
                self.tabs[sm_id]['root_state_name'] = sm.root_state.name
        else:
            logger.warning("State machine '{0}' tab label can not be updated there is no tab.".format(sm_id))