def METHOD_NAME(self, elm, parent: TreeNode) -> TreeNode:
    curr_parent = parent
    if elm.tag == 'corplist':
        node = TreeNode()
        node.name = elm.attrib.get('name', '-')
        if parent:
            parent.corplist.append(node)
        curr_parent = node
    elif elm.tag == 'corpus':
        parent.corplist.append(self.parse_corpus_node(elm))
    else:
        return None
    for child in [x for x in list(elm) if x.tag in ('corplist', 'corpus')]:
        (self.METHOD_NAME(child, curr_parent))
    return curr_parent