Tag Tree Traversal in Python.