code: func (pl *PackageLoader) Resolve(c context.Context, e *vpython.Environment) error {
  	spec := e.Spec
  	if spec == nil {
  		return nil
  	}
  
  	expander, err := pl.expanderForTags(c, e.Pep425Tag)
  	if err != nil {
  		return err
  	}
  
  	// Generate CIPD client options. If no root is provided, use a temporary root.
  	if pl.Options.Root != "" {
  		return pl.resolveWithOpts(c, pl.Options, expander, spec)
  	}
  
  	td := filesystem.TempDir{
  		Prefix: "vpython_cipd",
  		CleanupErrFunc: func(tdir string, err error) {
  			logging.WithError(err).Warningf(c, "Failed to clean up CIPD temporary directory [%s]", tdir)
  		},
  	}
  	return td.With(func(tdir string) error {
  		opts := pl.Options
  		opts.Root = tdir
  
  		return pl.resolveWithOpts(c, opts, expander, spec)
  	})
  }
docs: // Resolve implements venv.PackageLoader.
  //
  // The resulting packages slice will be updated in-place with the resolved
  // package name and instance ID.