code: def save_config(self, out_file_name):
          
  
          def get_hidden_parameter(item):
  
              numer_of_sub_elements = item.childCount()
  
              if numer_of_sub_elements == 0:
                  dictator = {item.name : item.visible}
              else:
                  dictator = {item.name:{}}
                  for child_id in range(numer_of_sub_elements):
                      dictator[item.name].update(get_hidden_parameter(item.child(child_id)))
              return dictator
  
          out_file_name = str(out_file_name)
          if not os.path.exists(os.path.dirname(out_file_name)):
              os.makedirs(os.path.dirname(out_file_name))
  
          # build a dictionary for the configuration of the hidden parameters
          dictator = {}
          for index in range(self.tree_scripts.topLevelItemCount()):
              script_item = self.tree_scripts.topLevelItem(index)
              dictator.update(get_hidden_parameter(script_item))
  
          dictator = {"gui_settings": self.gui_settings, "scripts_hidden_parameters":dictator}
  
          # update the internal dictionaries from the trees in the gui
          for index in range(self.tree_scripts.topLevelItemCount()):
              script_item = self.tree_scripts.topLevelItem(index)
              self.update_script_from_item(script_item)
  
          dictator.update({'instruments': {}, 'scripts': {}, 'probes': {}})
  
          for instrument in self.instruments.values():
              dictator['instruments'].update(instrument.to_dict())
          for script in self.scripts.values():
              dictator['scripts'].update(script.to_dict())
  
          for instrument, probe_dict in self.probes.items():
              dictator['probes'].update({instrument: ','.join(list(probe_dict.keys()))})
  
          with open(out_file_name, 'w') as outfile:
              tmp = json.dump(dictator, outfile, indent=4)
docs: saves gui configuration to out_file_name
          Args:
              out_file_name: name of file