code: func (c *client) Restore(ctx context.Context, id string, attachStdio libcontainerdtypes.StdioCallback) (bool, int, libcontainerdtypes.Process, error) {
  	c.logger.WithField("container", id).Debug("restore()")
  
  	// TODO Windows: On RS1, a re-attach isn't possible.
  	// However, there is a scenario in which there is an issue.
  	// Consider a background container. The daemon dies unexpectedly.
  	// HCS will still have the compute service alive and running.
  	// For consistence, we call in to shoot it regardless if HCS knows about it
  	// We explicitly just log a warning if the terminate fails.
  	// Then we tell the backend the container exited.
  	if hc, err := hcsshim.OpenContainer(id); err == nil {
  		const terminateTimeout = time.Minute * 2
  		err := hc.Terminate()
  
  		if hcsshim.IsPending(err) {
  			err = hc.WaitTimeout(terminateTimeout)
  		} else if hcsshim.IsAlreadyStopped(err) {
  			err = nil
  		}
  
  		if err != nil {
  			c.logger.WithField("container", id).WithError(err).Debug("terminate failed on restore")
  			return false, -1, nil, err
  		}
  	}
  	return false, -1, &restoredProcess{
  		c:  c,
  		id: id,
  	}, nil
  }
docs: // Restore is the handler for restoring a container