test = th.tree_to_list(TreeIn, lambda x:x)
There may be a better way, but the documentation states the following:
| tree_to_list(input, retrieve_base=<function <lambda$33> at 0x0000000000000089>) | Returns a list representation of a Grasshopper DataTree.
| input: A tree to be transformed.
| retrieve_base= lambda x: x:
| Most trees start with a  path that is never changed.
| That is rendered as a list with a single item. However, for simplicity, most users
| will want to start using the first branch in that path. Therefore, retrieve_base
| defaults to a function that will just return the first item in the output.
| If a tree is created manually or edited,
| then it can also have paths starting with  etc. In this case, retrieve_base can
| be set to None. In this case, the entire result is returned, inside a single list.
| This is the equivalent of the “source” input for list_to_tree.
| A list object
it’s a result of your data tree structure starting with 3.