docs: def get_state_tuple(state, state_m=None):
      """ Generates a tuple that holds the state as yaml-strings and its meta data in a dictionary.
      The tuple consists of:
      [0] json_str for state,
      [1] dict of child_state tuples,
      [2] dict of model_meta-data of self and elements
      [3] path of state in state machine
      [4] script_text
      [5] file system path
      [6] semantic data
      #   states-meta - [state-, transitions-, data_flows-, outcomes-, inputs-, outputs-, scopes, states-meta]
  
      :param rafcon.core.states.state.State state: The state that should be stored
      :return: state_tuple tuple
      """
      state_str = json.dumps(state, cls=JSONObjectEncoder,
                             indent=4, check_circular=False, sort_keys=True)
  
      state_tuples_dict = {}
      if isinstance(state, ContainerState):
          # print(state.states, "\n")
          for child_state_id, child_state in state.states.items():
              # print("child_state: %s" % child_state_id, child_state, "\n")
              state_tuples_dict[child_state_id] = get_state_tuple(child_state)
  
      state_meta_dict = {} if state_m is None else get_state_element_meta(state_m)
  
      script_content = state.script.script if isinstance(state, ExecutionState) else None
  
      state_tuple = (state_str, state_tuples_dict, state_meta_dict, state.get_path(), script_content,
                     state.file_system_path, copy.deepcopy(state.semantic_data))
  
      return state_tuple