docs: def duplicate(self):
          """
          create an copy of the script
  
          Returns:
  
          """
  
          # get settings of script
          class_of_script = self.__class__
          script_name = self.name
          script_instruments = self.instruments
          sub_scripts = self.scripts
          script_settings = self.settings
          log_function = self.log_function
          data_path = self.data_path
  
  
          #create a new instance of same script type
          class_creation_string = ''
          if script_instruments != {}:
              class_creation_string += ', instruments = script_instruments'
          if sub_scripts != {}:
              class_creation_string += ', scripts = sub_scripts'
          if script_settings != {}:
              class_creation_string += ', settings = script_settings'
          if log_function is not None:
              class_creation_string += ', log_function = log_function'
          if data_path is not None:
              class_creation_string += ', data_path = data_path'
          class_creation_string = 'class_of_script(name=script_name{:s})'.format(class_creation_string)
          # create instance
          script_instance = eval(class_creation_string)
  
          # copy some other properties that might be checked later for the duplicated script
          script_instance.data = deepcopy(self.data)
          script_instance.start_time = self.start_time
          script_instance.end_time = self.end_time
          script_instance.is_running = self.is_running
  
          return script_instance