def pom_add_or_modify_tag(root, tag, text, insert_index=None):
    child = root.find(tag)
    if child is None:
        child = Xml.Element(tag)
        if insert_index is None:
            root.append(child)
        else:
            root.insert(insert_index, child)
    child.text = text
Split path into head and last component for the completer.
dataset/ETHPy150Open databricks/spark-package-cmd-tool/python/spark_package/spark_package.py/pom_add_or_modify_tag--crossover with--dataset/ETHPy150Open j-bennet/wharfee/wharfee/helpers.py/parse_path