pet_scop_from_pet_tree: extract pet_scop from the root down to the leaves