code: def update_script_from_item(self, item):
          
  
          script, path_to_script, script_item = item.get_script()
  
          # build dictionary
          # get full information from script
          dictator = list(script_item.to_dict().values())[0]  # there is only one item in the dictionary
  
          for instrument in list(script.instruments.keys()):
              # update instrument
              script.instruments[instrument]['settings'] = dictator[instrument]['settings']
              # remove instrument
              del dictator[instrument]
  
  
          for sub_script_name in list(script.scripts.keys()):
              sub_script_item = script_item.get_subscript(sub_script_name)
              self.update_script_from_item(sub_script_item)
              del dictator[sub_script_name]
  
          script.update(dictator)
          # update datefolder path
          script.data_path = self.gui_settings['data_folder']
docs: updates the script based on the information provided in item
  
          Args:
              script: script to be updated
              item: B26QTreeItem that contains the new settings of the script