def METHOD_NAME(icon_definitions, version):
    with open(icon_definitions_path, "r") as f:
        icon_definitions_file = f.read()
    # Change md_icons list
    new_icon_definitions = re_icon_definitions.sub(
        icon_definitions.replace("\\", "\\\\"), icon_definitions_file, 1
    )
    # Change version
    new_icon_definitions = re_version_in_file.sub(
        version, new_icon_definitions, 1
    )
    with open(icon_definitions_path, "w") as f:
        f.write(new_icon_definitions)