docs: def update_data_flows(model, data_flow_dict, tree_dict_combos):
      """ Updates data flow dictionary and combo dictionary of the widget according handed model.
  
      :param model: model for which the data_flow_dict and tree_dict_combos should be updated
      :param data_flow_dict: dictionary that holds all internal and external data-flows and those respective row labels
      :param tree_dict_combos: dictionary that holds all internal and external data-flow-adaptation-combos
      :return:
      """
      data_flow_dict['internal'] = {}
      data_flow_dict['external'] = {}
      tree_dict_combos['internal'] = {}
      tree_dict_combos['external'] = {}
  
      # free input ports and scopes are real to_keys and real states
      [free_to_port_internal, from_ports_internal] = find_free_keys(model)
      [free_to_port_external, from_ports_external] = find_free_keys(model.parent)
  
      def take_from_dict(from_dict, key):
          if key in from_dict:
              return from_dict[key]
          else:
              logger.warning("Key '%s' is not in %s" % (key, from_dict))
              pass
  
      # from_state, to_key, to_state, to_key, external
      if isinstance(model, ContainerStateModel):
          for data_flow in list(model.state.data_flows.values()):  # model.data_flow_list_store:
  
              # TREE STORE LABEL
              # check if from Self_state
              if data_flow.from_state == model.state.state_id:
                  from_state = model.state
                  from_state_label = 'self.' + model.state.name + '.' + data_flow.from_state
              else:
                  if take_from_dict(model.state.states, data_flow.from_state):
                      from_state = take_from_dict(model.state.states, data_flow.from_state)
                      from_state_label = from_state.name + '.' + data_flow.from_state
                  else:
                      # print(data_flow.from_state, data_flow.from_key, data_flow.to_state, data_flow.to_key)
                      logger.warning("DO break in ctrl/data_flow.py -1")
                      break
              # check if to Self_state
              if data_flow.to_state == model.state.state_id:
                  to_state = model.state
                  to_state_label = 'self.' + model.state.name + '.' + data_flow.to_state
              else:
                  if take_from_dict(model.state.states, data_flow.to_state):
                      to_state = take_from_dict(model.state.states, data_flow.to_state)
                      to_state_label = to_state.name + '.' + data_flow.to_state
                  else:
                      # print(data_flow.from_state, data_flow.from_key, data_flow.to_state, data_flow.to_key)
                      logger.warning("DO break in ctrl/data_flow.py 0")
                      break
  
              from_key_port = from_state.get_data_port_by_id(data_flow.from_key)
              from_key_label = ''
              if from_key_port is not None:
                  from_key_label = PORT_TYPE_TAG.get(type(from_key_port), 'None') + '.' + \
                                   from_key_port.data_type.__name__ + '.' + \
                                   from_key_port.name
  
              to_key_port = to_state.get_data_port_by_id(data_flow.to_key)
              # to_key_label = ''
              if to_key_port is not None:
                  to_key_label = PORT_TYPE_TAG.get(type(to_key_port), 'None') + '.' + \
                                 (to_key_port.data_type.__name__ or 'None') + '.' + \
                                 to_key_port.name
              data_flow_dict['internal'][data_flow.data_flow_id] = {'from_state': from_state_label,
                                                                    'from_key': from_key_label,
                                                                    'to_state': to_state_label,
                                                                    'to_key': to_key_label}
  
              # ALL INTERNAL COMBOS
              from_states_store = Gtk.ListStore(GObject.TYPE_STRING)
              to_states_store = Gtk.ListStore(GObject.TYPE_STRING)
              if isinstance(model, ContainerStateModel):
                  if model.state.state_id in free_to_port_internal or model.state.state_id == data_flow.to_state:
                      to_states_store.append(['self.' + model.state.name + '.' + model.state.state_id])
                  if model.state.state_id in from_ports_internal or model.state.state_id == data_flow.from_state:
                      from_states_store.append(['self.' + model.state.name + '.' + model.state.state_id])
                  for state_model in list(model.states.values()):
                      if state_model.state.state_id in free_to_port_internal or \
                                      state_model.state.state_id == data_flow.to_state:
                          to_states_store.append([state_model.state.name + '.' + state_model.state.state_id])
                      if state_model.state.state_id in from_ports_internal or \
                                      state_model.state.state_id == data_flow.from_state:
                          from_states_store.append([state_model.state.name + '.' + state_model.state.state_id])
  
              from_keys_store = Gtk.ListStore(GObject.TYPE_STRING)
              if model.state.state_id == data_flow.from_state:
                  # print("input_ports", model.state.input_data_ports)
                  # print(type(model))
                  if isinstance(model, ContainerStateModel):
                      # print("scoped_variables", model.state.scoped_variables)
                      combined_ports = {}
                      combined_ports.update(model.state.scoped_variables)
                      combined_ports.update(model.state.input_data_ports)
                      get_key_combos(combined_ports, from_keys_store, data_flow.from_key)
                  else:
                      get_key_combos(model.state.input_data_ports, from_keys_store, data_flow.from_key)
              else:
                  # print("output_ports", model.states[data_flow.from_state].state.output_data_ports)
                  get_key_combos(model.state.states[data_flow.from_state].output_data_ports,
                                 from_keys_store, data_flow.from_key)
  
              to_keys_store = Gtk.ListStore(GObject.TYPE_STRING)
              if model.state.state_id == data_flow.to_state:
                  # print("output_ports", model.state.output_data_ports)
                  # print(type(model))
                  if isinstance(model, ContainerStateModel):
                      # print("scoped_variables", model.state.scoped_variables)
                      combined_ports = {}
                      combined_ports.update(model.state.scoped_variables)
                      combined_ports.update(model.state.output_data_ports)
                      get_key_combos(combined_ports, to_keys_store, data_flow.to_key)
                  else:
                      get_key_combos(model.state.output_data_ports, to_keys_store, data_flow.to_key)
              else:
                  # print("input_ports", model.states[data_flow.to_state].state.input_data_ports)
                  get_key_combos(model.state.states[data_flow.to_state].input_data_ports
                                 , to_keys_store, data_flow.to_key)
              tree_dict_combos['internal'][data_flow.data_flow_id] = {'from_state': from_states_store,
                                                                      'from_key': from_keys_store,
                                                                      'to_state': to_states_store,
                                                                      'to_key': to_keys_store}
              # print("internal", data_flow_dict['internal'][data_flow.data_flow_id])
  
      if not model.state.is_root_state:
          for data_flow in list(model.parent.state.data_flows.values()):  # model.parent.data_flow_list_store:
  
              # TREE STORE LABEL
              # check if from Self_state
              if model.state.state_id == data_flow.from_state:
                  from_state = model.state
                  from_state_label = 'self.' + model.state.name + '.' + data_flow.from_state
              else:
                  if model.parent.state.state_id == data_flow.from_state:
                      from_state = model.parent.state
                      from_state_label = 'parent.' + model.parent.state.name + '.' + data_flow.from_state
                  else:
                      if take_from_dict(model.parent.state.states, data_flow.from_state):
                          from_state = take_from_dict(model.parent.state.states, data_flow.from_state)
                          from_state_label = from_state.name + '.' + data_flow.from_state
                      else:
                          # print("#", data_flow.from_state, data_flow.from_key, data_flow.to_state, data_flow.to_key)
                          logger.warning("DO break in ctrl/data_flow.py 1")
                          break
  
              # check if to Self_state
              if model.state.state_id == data_flow.to_state:
                  to_state = model.state
                  to_state_label = 'self.' + model.state.name + '.' + data_flow.to_state
              else:
                  if model.parent.state.state_id == data_flow.to_state:
                      to_state = model.parent.state
                      to_state_label = 'parent.' + model.parent.state.name + '.' + data_flow.to_state
                  else:
                      if take_from_dict(model.parent.state.states, data_flow.to_state):
                          to_state = take_from_dict(model.parent.state.states, data_flow.to_state)
                          to_state_label = to_state.name + '.' + data_flow.to_state
                      else:
                          # print("##", data_flow.from_state, data_flow.from_key, data_flow.to_state, data_flow.to_key)
                          logger.warning("DO break in ctrl/data_flow.py 2")
                          break
              if model.state.state_id in [data_flow.from_state, data_flow.to_state]:
                  from_key_port = from_state.get_data_port_by_id(data_flow.from_key)
                  if from_key_port is None:
                      continue
                  from_key_label = PORT_TYPE_TAG.get(type(from_key_port), 'None') + '.' + \
                                   from_key_port.data_type.__name__ + '.' + \
                                   from_key_port.name
                  to_key_port = to_state.get_data_port_by_id(data_flow.to_key)
                  if to_key_port is None:
                      continue
                  to_key_label = PORT_TYPE_TAG.get(type(to_key_port), 'None') + '.' + \
                                 to_key_port.data_type.__name__ + '.' + \
                                 to_key_port.name
                  data_flow_dict['external'][data_flow.data_flow_id] = {'from_state': from_state_label,
                                                                        'from_key': from_key_label,
                                                                        'to_state': to_state_label,
                                                                        'to_key': to_key_label}
  
              # ALL EXTERNAL COMBOS
              if model.state.state_id in [data_flow.from_state, data_flow.to_state]:
  
                  # only self-state
                  from_states_store = Gtk.ListStore(GObject.TYPE_STRING)
                  for state_id in list(from_ports_external.keys()):
                      if model.parent.state.state_id == state_id:
                          state_model = model.parent
                      else:
                          state_model = model.parent.states[state_id]
                      if state_model.state.state_id == model.state.state_id:
                          from_states_store.append(['self.' + state_model.state.name + '.' + state_model.state.state_id])
                      else:
                          from_states_store.append([state_model.state.name + '.' + state_model.state.state_id])
                          # from_states_store.append(['self.' + model.state.name + '.' + model.state.state_id])
  
                  # only outports of self
                  from_keys_store = Gtk.ListStore(GObject.TYPE_STRING)
                  if model.parent.state.state_id == data_flow.from_state:
                      # print("output_ports", model.parent.states[data_flow.from_state].state.output_data_ports)
                      combined_ports = {}
                      combined_ports.update(model.parent.state.input_data_ports)
                      combined_ports.update(model.parent.state.scoped_variables)
                      get_key_combos(combined_ports, from_keys_store, data_flow.to_key)
                  elif data_flow.from_state in [state_m.state.state_id for state_m in list(model.parent.states.values())]:
                      get_key_combos(model.parent.state.states[data_flow.from_state].output_data_ports,
                                     from_keys_store, data_flow.to_key)
                  else:
                      logger.error(
                          "---------------- FAILURE %s ------------- external from_state PARENT or STATES" % model.state.state_id)
  
                  # all states and parent-state
                  to_states_store = Gtk.ListStore(GObject.TYPE_STRING)
                  for state_id in list(free_to_port_external.keys()):
                      if model.parent.state.state_id == state_id:
                          state_model = model.parent
                      else:
                          state_model = model.parent.states[state_id]
                      if state_model.state.state_id == model.state.state_id:
                          to_states_store.append(['self.' + state_model.state.name + '.' + state_model.state.state_id])
                      else:
                          to_states_store.append([state_model.state.name + '.' + state_model.state.state_id])
  
                  # all keys of actual to-state
                  to_keys_store = Gtk.ListStore(GObject.TYPE_STRING)
                  if get_state_model(model.parent, data_flow.to_state):
                      to_state_model = get_state_model(model.parent, data_flow.to_state)
                      from_state_model = get_state_model(model.parent, data_flow.to_state)
                      act_from_key_port = from_state_model.state.get_data_port_by_id(data_flow.from_key)
                      act_to_key_port = to_state_model.state.get_data_port_by_id(data_flow.to_key)
  
                      # first actual port
                      to_keys_store.append([PORT_TYPE_TAG.get(type(act_to_key_port), 'None') + '.#' +
                                            str(act_to_key_port.data_port_id) + '.' +
                                            act_to_key_port.data_type.__name__ + '.' +
                                            act_to_key_port.name])
  
                      # second all other possible ones
                      if to_state_model.state is model.state.parent:
                          possible_port_ids = list(to_state_model.state.output_data_ports.keys()) + list(to_state_model.state.scoped_variables.keys())
                      else:
                          possible_port_ids = list(to_state_model.state.input_data_ports.keys())
                      for port_id in possible_port_ids:
                          port = to_state_model.state.get_data_port_by_id(port_id)
                          # to_state = get_state_model(model.parent, data_flow.to_state).state
                          if not (PORT_TYPE_TAG.get(type(act_from_key_port), 'None') == 'SV' and port.data_port_id == data_flow.from_key)\
                                  and port is not act_to_key_port:
                              to_keys_store.append([PORT_TYPE_TAG.get(type(port), 'None') + '.#' +
                                                    str(port.data_port_id) + '.' +
                                                    port.data_type.__name__ + '.' +
                                                    port.name])
  
                  tree_dict_combos['external'][data_flow.data_flow_id] = {'from_state': from_states_store,
                                                                          'from_key': from_keys_store,
                                                                          'to_state': to_states_store,
                                                                          'to_key': to_keys_store}
                  # print("external", data_flow_dict['external'][data_flow.data_flow_id])
  
      # print("ALL SCANNED: ", data_flow_dict['internal'].keys(), data_flow_dict['external'].keys(), \)
      #     tree_dict_combos['internal'].keys(), tree_dict_combos['external'].keys()
      return free_to_port_internal, free_to_port_external, from_ports_internal, from_ports_external