prune_depth function

Prune a tree up to a specified depth.