getTree function

Extract a single tree from a forest.