This library can print arbitrary trees. This requires you to specify how the value of a node, and list of it's children can be extracted from the node object.