def promote_nested_tags(tag, xml):
    """We don't currently support certain tags nested inside subparts, so
    promote each up one level"""
    for subjgrp_xml in reversed(xml.xpath('.//SUBPART/' + tag)):
        subpart_xml = subjgrp_xml.getparent()
        subpart_parent = subpart_xml.getparent()
        idx = subpart_parent.index(subpart_xml) + 1
        subpart_parent.insert(idx, subjgrp_xml)
