ENH: Add entity print_tree function