code: func (sc *stateCheckpoint) restoreState() error {
  	sc.mux.Lock()
  	defer sc.mux.Unlock()
  	var err error
  
  	// used when all parsing is ok
  	tmpAssignments := make(ContainerCPUAssignments)
  	tmpDefaultCPUSet := cpuset.NewCPUSet()
  	tmpContainerCPUSet := cpuset.NewCPUSet()
  
  	checkpoint := NewCPUManagerCheckpoint()
  	if err = sc.checkpointManager.GetCheckpoint(sc.checkpointName, checkpoint); err != nil {
  		if err == errors.ErrCheckpointNotFound {
  			sc.storeState()
  			return nil
  		}
  		return err
  	}
  
  	if sc.policyName != checkpoint.PolicyName {
  		return fmt.Errorf("configured policy %q differs from state checkpoint policy %q", sc.policyName, checkpoint.PolicyName)
  	}
  
  	if tmpDefaultCPUSet, err = cpuset.Parse(checkpoint.DefaultCPUSet); err != nil {
  		return fmt.Errorf("could not parse default cpu set %q: %v", checkpoint.DefaultCPUSet, err)
  	}
  
  	for containerID, cpuString := range checkpoint.Entries {
  		if tmpContainerCPUSet, err = cpuset.Parse(cpuString); err != nil {
  			return fmt.Errorf("could not parse cpuset %q for container id %q: %v", cpuString, containerID, err)
  		}
  		tmpAssignments[containerID] = tmpContainerCPUSet
  	}
  
  	sc.cache.SetDefaultCPUSet(tmpDefaultCPUSet)
  	sc.cache.SetCPUAssignments(tmpAssignments)
  
  	klog.V(2).Info("[cpumanager] state checkpoint: restored state from checkpoint")
  	klog.V(2).Infof("[cpumanager] state checkpoint: defaultCPUSet: %s", tmpDefaultCPUSet.String())
  
  	return nil
  }
docs: // restores state from a checkpoint and creates it if it doesn't exist