TreeLevel
TreeLevel[tree, levelspec] gives a list of all subtrees of tree on levels specified by levelspec.
TreeLevel[tree, levelspec -> elem]gives a list of the element elem of subtrees on levels specified by levelspec.TreeLevel[levelspec]represents an operator form ofTreeLevelthat can be applied to a tree.
Examples
tree = Tree[a, {Tree[b, {c, d}], Tree[e, {f}]}];
TreeLevel[tree, {2}]Please visit the official Wolfram Language Reference for more details.