code: def _prune(self, pop_candidates):
          
          return set(
              sorted(pop_candidates, key=self._score, reverse=True)
              [:self.args.max_pop]
          )
docs: Choose a subset of the candidate states to continue on to the next
          generation.
  
          :param pop_candidates: The set of candidate states.