When and How to Prune an Apple Tree