def _last_index(self, s):
        self.set_index(max(0, self._find_one_after_last_labeled_index() - 1))
def _restore_vars(v_list, t_list):
  """Restore variables in v_list from t_list."""
  ops = []
  for v, t in zip(v_list, t_list):
    ops.append(v.assign(t))
  return ops