def METHOD_NAME(xml_doc):
    ret = xml.change_xml(
        xml_doc,
        {"memtune": {"hugepages": [{"size": "1024"}, {"size": "512"}]}},
        [
            {
                "path": "memtune:hugepages:{id}:size",
                "xpath": "memtune/hugepages/page[$id]",
                "get": lambda n: n.get("size"),
                "set": lambda n, v: n.set("size", v),
                "del": xml.del_attribute("size"),
            },
        ],
    )
    assert ret
    assert ["1024", "512"] == [
        n.get("size") for n in xml_doc.findall("memtune/hugepages/page")
    ]