Implemented function to communicate pruned trees