The function configtree.set_tag is used heavily in migration scripts, and is a binding to the backend 'set_tag(path, true). The migration script
bgp/0-to-1 elegantly moves an existing tag node to a leaf node, and in this case, delete_tag is not needed. To generalize the method there, however, delete_tag should be used. This is as simple as adding a binding to the backend 'set_tag(path, false).