def METHOD_NAME(
    base_arguments: list[str],
    with_base: bool,
    args: list[str],
    config: str,
) -> None:
    """Check equality of the CLI --write options to config files."""
    cli_parser = cli.get_cli_parser()
    command = base_arguments + args if with_base else args
    options = cli_parser.parse_args(command)
    file_config = cli.load_config(config)[0]
    file_value = file_config.get("write_list")
    orig_cli_value = options.write_list
    cli_value = cli.WriteArgAction.merge_write_list_config(
        from_file=[],
        from_cli=orig_cli_value,
    )
    assert file_value == cli_value