code: func deref(c context.Context, cfg *Config) error {
  	// Cache fetched files.
  	fileMap := make(map[string]string)
  	cli := getInterface(c)
  	set := cfgclient.CurrentServiceConfigSet(c)
  	for _, v := range cfg.VMs.GetVms() {
  		for i, m := range v.GetAttributes().Metadata {
  			if m.GetFromFile() != "" {
  				parts := strings.SplitN(m.GetFromFile(), ":", 2)
  				if len(parts) < 2 {
  					return errors.Reason("metadata from file must be in key:value form").Err()
  				}
  				file := parts[1]
  				if _, ok := fileMap[file]; !ok {
  					fileCfg, err := cli.GetConfig(c, set, file, false)
  					if err != nil {
  						return errors.Annotate(err, "failed to fetch %q", file).Err()
  					}
  					logging.Debugf(c, "found %q revision %s", file, fileCfg.Revision)
  					if fileCfg.Revision != cfg.revision {
  						return errors.Reason("config revision mismatch %q", fileCfg.Revision).Err()
  					}
  					fileMap[file] = fileCfg.Content
  				}
  				// fileMap[file] definitely exists.
  				key := parts[0]
  				val := fileMap[file]
  				v.Attributes.Metadata[i].Metadata = &gce.Metadata_FromText{
  					FromText: fmt.Sprintf("%s:%s", key, val),
  				}
  			}
  		}
  	}
  	return nil
  }
docs: // deref dereferences VMs metadata by fetching referenced files.