code: def truncation_replacement(random, population, parents, offspring, args):
      
      psize = len(population)
      population.extend(list(offspring))
      population.sort(reverse=True)
      return population[:psize]
docs: Replaces population with the best of the population and offspring.
      
      This function performs truncation replacement, which means that
      the entire existing population is replaced by the best from among
      the current population and offspring, keeping the existing population
      size fixed. This is similar to so-called "plus" replacement in the 
      evolution strategies literature, except that "plus" replacement 
      considers only parents and offspring for survival. However, if the
      entire population are parents (which is often the case in evolution 
      strategies), then truncation replacement and plus-replacement are 
      equivalent approaches.
      
      .. Arguments:
         random -- the random number generator object
         population -- the population of individuals
         parents -- the list of parent individuals
         offspring -- the list of offspring individuals
         args -- a dictionary of keyword arguments