def METHOD_NAME(tree, options):
    location = options.get("filename", DEFAULT_LOCATION)
    config = options["config"]
    comment = options.get("comment", [])
    filebase = options.get("filebase")
    path = os.path.join(tree, location.lstrip("/"))
    data = {}
    # if a filebase was specified, we use it as base
    if filebase:
        with open(filebase, "r", encoding="utf8") as f:
            data = toml.load(f)
    # if the target exists, we merge it
    with contextlib.suppress(FileNotFoundError):
        with open(path, "r", encoding="utf8") as f:
            have = toml.load(f)
            merge_config("storage", data, have)
    # now merge our configuration into data
    merge_config("storage", data, config)
    with open(path, "w", encoding="utf8") as f:
        write_comment(f, HEADER)
        write_comment(f, comment)
        toml.dump(data, f)
    return 0