docs: def refresh_state_machines(self, state_machine_ids):
          """ Refresh list af state machine tabs
  
          :param list state_machine_ids: List of state machine ids to be refreshed
          :return:
          """
          # remember current selected state machine id
          currently_selected_sm_id = None
          if self.model.get_selected_state_machine_model():
              currently_selected_sm_id = self.model.get_selected_state_machine_model().state_machine.state_machine_id
  
          # create a dictionary from state machine id to state machine path and one for tab page number for recovery
          state_machine_path_by_sm_id = {}
          page_num_by_sm_id = {}
          for sm_id, sm in self.model.state_machine_manager.state_machines.items():
              # the sm.base_path is only None if the state machine has never been loaded or saved before
              if sm_id in state_machine_ids and sm.file_system_path is not None:
                  state_machine_path_by_sm_id[sm_id] = sm.file_system_path
                  page_num_by_sm_id[sm_id] = self.get_page_num(sm_id)
  
          # close all state machine in list and remember if one was not closed
          for sm_id in state_machine_ids:
              was_closed = self.on_close_clicked(None, self.model.state_machines[sm_id], None, force=True)
              if not was_closed and sm_id in page_num_by_sm_id:
                  logger.info("State machine with id {0} will not be re-open because was not closed.".format(sm_id))
                  del state_machine_path_by_sm_id[sm_id]
                  del page_num_by_sm_id[sm_id]
  
          # reload state machines from file system
          try:
              self.model.state_machine_manager.open_state_machines(state_machine_path_by_sm_id)
          except AttributeError as e:
              logger.warning("Not all state machines were re-open because {0}".format(e))
          import rafcon.gui.utils
          rafcon.gui.utils.wait_for_gui()  # TODO check again this is needed  to secure that all sm-models are generated
  
          # recover tab arrangement
          self.rearrange_state_machines(page_num_by_sm_id)
  
          # recover initial selected state machine and case handling if now state machine is open anymore
          if currently_selected_sm_id:
              # case if only unsaved state machines are open
              if currently_selected_sm_id in self.model.state_machine_manager.state_machines:
                  self.set_active_state_machine(currently_selected_sm_id)