def METHOD_NAME(config, config_file=None, config_dict=None, clear_existing=False):
    if clear_existing:
        for key in list(config.keys()):
            del config[key]
    if config_dict is None:
        config_dict = load_yaml_file(config_file)
    defaults = _to_options_map(config_dict)
    if defaults:
        for key, value in iteritems(defaults):
            if key in config and hasattr(config[key], 'update'):
                config[key].update(value)
            else:
                config[key] = value