def restore_state(self, partition, step_in_partition):
    """Restore from a induction state and set current partition and step."""
    self.current_rules |= set(
        qcfg_file.read_rules(self.get_rule_file(partition, step_in_partition)))
    if step_in_partition == self._config["max_num_steps"] - 1:
      self.current_partition = partition + 1
      self.current_step_in_partition = 0
    else:
      self.current_partition = partition
      self.current_step_in_partition = step_in_partition + 1
    logging.info("Restored from partition %s step %s.", partition,
                 step_in_partition)
    logging.info("Current partition: %s, current step: %s.",
                 self.current_partition, self.current_step_in_partition)
Restore from a induction state and set current partition and step.
language/compgen/csl/induction/induction_utils.py