def METHOD_NAME(source_file_paths, dest_file_path, use_env=True, logger=logging.log):
    """
    Merge multiple configuration sources into one rucio.cfg.
    On conflicting values, relies on the default python's ConfigParser behavior: the value from last source wins.
    Sources can be .ini, .yaml, or .json files. Json is supported as a compromise solution for easier integration
    with kubernetes (because both python and helm natively support it).
    If use_env=True, env variables starting with RUCIO_CFG_ are also merged as the last (highest priority) source.
    """
    parser = configparser.ConfigParser()
    for path in source_file_paths:
        path = Path(path)
        if not path.exists():
            logger(logging.WARNING, "Skipping {}: path doesn't exist".format(path))
            continue
        if path.is_dir():
            file_paths = sorted(p for p in path.iterdir() if not p.name.startswith(".") and p.is_file())
        else:
            file_paths = [path]
        for file_path in file_paths:
            try:
                if file_path.suffix == '.json':
                    with open(file_path, 'r') as f:
                        file_config = fix_multi_word_sections(json.load(f))
                        parser.read_dict(file_config)
                elif yaml and file_path.suffix in ['.yaml', '.yml']:
                    with open(file_path, 'r') as f:
                        file_config = fix_multi_word_sections(yaml.safe_load(f))
                        parser.read_dict(file_config)
                elif path.is_file() or file_path.suffix in ['.ini', '.cfg', '.config']:
                    local_parser = configparser.ConfigParser()
                    local_parser.read(file_path)
                    file_config = {section: {option: value for option, value in section_proxy.items()} for section, section_proxy in local_parser.items()}
                else:
                    logger(logging.WARNING, "Skipping file {} due to wrong extension".format(file_path))
                    continue
                parser.read_dict(file_config)
                logger(logging.INFO, "Merged {} configuration values from {}".format(config_len(file_config), file_path))
            except Exception as error:
                logger(logging.WARNING, "Skipping file {} due to error: {}".format(file_path, error))
    if use_env:
        # env variables use the following format: "RUCIO_CFG_{section.substitute('-','_').upper}_{option.substitute('-', '_').upper}"
        env_config = {}
        for env_key, env_value in os.environ.items():
            rucio_cfg_prefix = 'RUCIO_CFG_'
            if not env_key.startswith(rucio_cfg_prefix):
                continue
            env_key = env_key[len(rucio_cfg_prefix):].lower()  # convert "RUCIO_CFG_WHATEVER" to "whatever"
            env_config[env_key] = env_value
        env_config = fix_multi_word_sections(load_flat_config(env_config))
        parser.read_dict(env_config)
        logger(logging.INFO, "Merged {} configuration values from ENV".format(config_len(env_config)))
    if dest_file_path:
        with open(dest_file_path, 'w') as dest_file:
            parser.write(dest_file)
    else:
        parser.write(sys.stdout)