code: func (ut *UploadTracker) Finalize(isolatedPath string) (IsolatedSummary, error) {
  	isolFile, err := newIsolatedFile(ut.isol, isolatedPath)
  	if err != nil {
  		return IsolatedSummary{}, err
  	}
  
  	// Check and upload isolate JSON.
  	ut.checker.AddItem(isolFile.item(ut.checker.Hash()), true, func(item *Item, ps *isolatedclient.PushState) {
  		if ps == nil {
  			return
  		}
  		log.Printf("QUEUED %q for upload", item.RelPath)
  		ut.uploader.UploadBytes(item.RelPath, isolFile.contents(), ps, func() {
  			log.Printf("UPLOADED %q", item.RelPath)
  		})
  	})
  
  	// Write the isolated file...
  	if isolFile.path != "" {
  		if err := isolFile.writeJSONFile(ut.lOS); err != nil {
  			return IsolatedSummary{}, err
  		}
  	}
  
  	return IsolatedSummary{
  		Name:   isolFile.name(),
  		Digest: isolFile.item(ut.checker.Hash()).Digest,
  	}, nil
  }
docs: // Finalize creates and uploads the isolate JSON at the isolatePath, and closes the checker and uploader.
  // It returns the isolate name and digest.
  // Finalize should only be called after UploadDeps.