code: func merge(c context.Context, cfg *Config) error {
  	kindsMap := cfg.Kinds.Map()
  	for _, v := range cfg.VMs.GetVms() {
  		if v.Kind != "" {
  			k, ok := kindsMap[v.Kind]
  			if !ok {
  				return errors.Reason("unknown kind %q", v.Kind).Err()
  			}
  			// Merge the config's attributes into a copy of the kind's.
  			// This ensures the config's attributes overwrite the kind's.
  			attrs := proto.Clone(k.Attributes).(*gce.VM)
  			// By default, proto.Merge concatenates repeated field values.
  			// Instead, make repeated fields in the config override the kind.
  			if len(v.Attributes.Disk) > 0 {
  				attrs.Disk = nil
  			}
  			if len(v.Attributes.Metadata) > 0 {
  				attrs.Metadata = nil
  			}
  			if len(v.Attributes.NetworkInterface) > 0 {
  				attrs.NetworkInterface = nil
  			}
  			if len(v.Attributes.Tag) > 0 {
  				attrs.Tag = nil
  			}
  			proto.Merge(attrs, v.Attributes)
  			v.Attributes = attrs
  		}
  	}
  	return nil
  }
docs: // merge merges validated configs.
  // Each config's referenced Kind is used to fill out unset values in its attributes.