findInTree
Finds a specific node in a tree on the given predicate.
Return
The first node that matches the predicate, or null if no matching node is found.
Parameters
tree
The root node of the tree.
predicate
The predicate function to determine if a node matches the search criteria.