docs: def load_and_append(instrument_dict, instruments=None, raise_errors=False):
          """
          load instrument from instrument_dict and append to instruments
  
          Args:
              instrument_dict: dictionary of form
  
                  instrument_dict = {
                  name_of_instrument_1 :
                      {"settings" : settings_dictionary, "class" : name_of_class}
                  name_of_instrument_2 :
                      {"settings" : settings_dictionary, "class" : name_of_class}
                  ...
                  }
  
              or
  
                  instrument_dict = {
                  name_of_instrument_1 : name_of_class,
                  name_of_instrument_2 : name_of_class
                  ...
                  }
  
              where name_of_class is either a class or a dictionary of the form {class: name_of__class, filepath: path_to_instr_file}
  
              instruments: dictionary of form
  
                  instruments = {
                  name_of_instrument_1 : instance_of_instrument_1,
                  name_of_instrument_2 : instance_of_instrument_2,
                  ...
                  }
  
              raise_errors: if true errors are raised, if False they are caught but not raised
  
  
  
          Returns:
                  dictionary updated_instruments that contains the old and the new instruments
  
                  and list loaded_failed = [name_of_instrument_1, name_of_instrument_2, ....] that contains the instruments that were requested but could not be loaded
  
          """
          if instruments is None:
              instruments = {}
  
          updated_instruments = {}
          updated_instruments.update(instruments)
          loaded_failed = {}
  
  
  
          for instrument_name, instrument_class_name in instrument_dict.items():
              instrument_settings = None
              module = None
  
              # check if instrument already exists
              if instrument_name in list(instruments.keys()) \
                      and instrument_class_name == instruments[instrument_name].__name__:
                  print(('WARNING: instrument {:s} already exists. Did not load!'.format(instrument_name)))
                  loaded_failed[instrument_name] = instrument_name
              else:
                  instrument_instance = None
  
                  if isinstance(instrument_class_name, dict):
                      if 'settings' in instrument_class_name:
                          instrument_settings = instrument_class_name['settings']
                      instrument_filepath = str(instrument_class_name['filepath'])
                      instrument_class_name = str(instrument_class_name['class'])
                      path_to_module, _ = module_name_from_path(instrument_filepath)
                      module = import_module(path_to_module)
                      class_of_instrument = getattr(module, instrument_class_name)
                      try:
                          if instrument_settings is None:
                              # this creates an instance of the class with default settings
                              instrument_instance = class_of_instrument(name=instrument_name)
                          else:
                              # this creates an instance of the class with custom settings
                              instrument_instance = class_of_instrument(name=instrument_name, settings=instrument_settings)
                      except Exception as e:
                          loaded_failed[instrument_name] = e
                          if raise_errors:
                              raise e
                          continue
                  elif isinstance(instrument_class_name, Instrument):
                      instrument_class_name = instrument_class_name.__class__
                      instrument_filepath = os.path.dirname(inspect.getfile(instrument_class_name))
  
                      # here we should also create an instrument instance at some point as in the other cases...
                      # instrument_instance =
                      raise NotImplementedError
                  elif issubclass(instrument_class_name, Instrument):
                      class_of_instrument = instrument_class_name
                      if instrument_settings is None:
                          # this creates an instance of the class with default settings
                          instrument_instance = class_of_instrument(name=instrument_name)
                      else:
                          # this creates an instance of the class with custom settings
                          instrument_instance = class_of_instrument(name=instrument_name,  settings=instrument_settings)
  
  
                  updated_instruments[instrument_name] = instrument_instance
  
  
  
          return updated_instruments, loaded_failed