code: func (daemon *Daemon) checkpointAndSave(container *container.Container) error {
  	container.Lock()
  	defer container.Unlock()
  	if err := container.CheckpointTo(daemon.containersReplica); err != nil {
  		return fmt.Errorf("Error saving container state: %v", err)
  	}
  	return nil
  }
docs: // checkpointAndSave grabs a container lock to safely call container.CheckpointTo