dm-tree (pypi): Tree is a library for working with nested data structures.
Keywords: tree|nest|flatten