code: def restore_checkpoint(filename):
          
          with gzip.open(filename) as f:
              generation, config, population, species_set, rndstate = pickle.load(f)
              random.setstate(rndstate)
              return Population(config, (population, species_set, generation))
docs: Resumes the simulation from a previous saved point.