def METHOD_NAME(changelog, name, version, entry):
    with open(changelog, encoding="utf-8") as i:
        prev_contents = i.read()
    title = f"# {name} {version} ({release_date_string()})\n\n"
    with open(changelog, "w", encoding="utf-8") as o:
        o.write(title)
        o.write(entry.strip())
        o.write("\n\n")
        o.write(prev_contents)