def METHOD_NAME(block, tree, parent):
    for elem in block:
        ename = elem.get("name")
        if ename is None:
            ename = ""
            # Only add sub-blocks if there are children
        if len(elem) or ((block.tag != "section") & (block.tag != "load")):
            if not isinstance(elem, ET._Comment):
                piter = tree.append(parent, [elem.tag.__str__() + " " + ename, elem])
                METHOD_NAME(elem, tree, piter)