carve_subtree function

Carve out branches to form a new tree.