docs: def register(self):
          """
          Change the state machine that is observed for new selected states to the selected state machine.
          :return:
          """
          # logger.debug("StateMachineEditionChangeHistory register state_machine old/new sm_id %s/%s" %
          #              (self.__my_selected_sm_id, self.model.selected_state_machine_id))
  
          # relieve old models
          if self.__my_selected_sm_id is not None:  # no old models available
              self.relieve_model(self._selected_sm_model.history)
  
          if self.model.selected_state_machine_id is not None and global_gui_config.get_config_value('HISTORY_ENABLED'):
  
              # set own selected state machine id
              self.__my_selected_sm_id = self.model.selected_state_machine_id
  
              # observe new models
              self._selected_sm_model = self.model.state_machines[self.__my_selected_sm_id]
              if self._selected_sm_model.history:
                  self.observe_model(self._selected_sm_model.history)
                  self.update(None, None, None)
              else:
                  logger.warning("The history is enabled but not generated {0}. {1}"
                                 "".format(self._selected_sm_model.state_machine.state_machine_id,
                                           self._selected_sm_model.state_machine.file_system_path))
          else:
              if self.__my_selected_sm_id is not None:
                  self.doing_update = True
                  self.history_tree_store.clear()
                  self.doing_update = False
              self.__my_selected_sm_id = None
              self._selected_sm_model = None