docs: def _add_new_state(self, *event, **kwargs):
          """Triggered when shortcut keys for adding a new state are pressed, or Menu Bar "Edit, Add State" is clicked.
  
          Adds a new state only if the the state machine tree is in focus.
          """
          if react_to_event(self.view, self.view['state_machine_tree_view'], event):
              state_type = StateType.EXECUTION if 'state_type' not in kwargs else kwargs['state_type']
              gui_helper_state_machine.add_new_state(self._selected_sm_model, state_type)
              return True