<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_graphical_state_machine_editor(self, state_machine_m):
 """Add to for new state machine If a new state machine was added, a new tab is created with a graphical editor for this state machine. :param StateMachineModel state_machine_m: The new state machine model """

        assert isinstance(state_machine_m, StateMachineModel)

        sm_id = state_machine_m.state_machine.state_machine_id
        logger.debug("Create new graphical editor for state machine with id %s" % str(sm_id))

        graphical_editor_view = GraphicalEditorGaphasView(state_machine_m)
        graphical_editor_ctrl = GraphicalEditorGaphasController(state_machine_m, graphical_editor_view)

        self.add_controller(sm_id, graphical_editor_ctrl)

        tab, tab_label = create_tab_header('', self.on_close_clicked, self.on_mouse_right_click,
                                           state_machine_m, 'refused')
        set_tab_label_texts(tab_label, state_machine_m, state_machine_m.state_machine.marked_dirty)

        page = graphical_editor_view['main_frame']

        self.view.notebook.append_page(page, tab)
        self.view.notebook.set_tab_reorderable(page, True)
        page.show_all()

        self.tabs[sm_id] = {'page': page,
                            'state_machine_m': state_machine_m,
                            'file_system_path': state_machine_m.state_machine.file_system_path,
                            'marked_dirty': state_machine_m.state_machine.marked_dirty,
                            'root_state_name': state_machine_m.state_machine.root_state.name}

        self.observe_model(state_machine_m)
        graphical_editor_view.show()
        self.view.notebook.show()
        self.last_focused_state_machine_ids.append(sm_id)