Added find_prune_candidates function.