Python implementation of tree data structure.