code: def override_options(config: DictLike, selected_options: Tuple[Any, ...], set_of_possible_options: Tuple[enum.Enum, ...], config_containing_override: DictLike = None) -> DictLike:
      if config_containing_override is None:
          config_containing_override = config
      override_opts = config_containing_override.pop("override")
      override_dict = determine_override_options(selected_options, override_opts, set_of_possible_options)
      logger.debug(f"override_dict: {override_dict}")
      for k, v in override_dict.items():
          if k in config:
              try:
                  config[k].anchor
                  logger.debug(f"type: {type(config[k])}, k: {k}")
                  if isinstance(config[k], list):
                      del config[k][:]
                      if isinstance(override_dict[k], (str, int, float, bool)):
                          config[k].append(override_dict[k])
                      else:
                          config[k].extend(override_dict[k])
                  elif isinstance(config[k], dict):
                      config[k].clear()
                      config[k].update(override_dict[k])
                  elif isinstance(config[k], (int, float, bool)):
                      logger.debug("Overwriting YAML anchor object. It is currently unclear how to reassign this value.")
                      config[k] = v
                  else:
                      raise ValueError(f"Object {k} (type {type(config[k])}) somehow has an anchor, but is something other than a list or dict. Attempting to assign directly to it.")
              except AttributeError:
                  config[k] = v
          else:
              raise KeyError(k, f"Trying to override key \"{k}\" that it is not in the config.")
      return config