code: func AsVersionedObjects(infos []*Info, version string, encoder runtime.Encoder) ([]runtime.Object, error) {
  	objects := []runtime.Object{}
  	for _, info := range infos {
  		if info.Object == nil {
  			continue
  		}
  
  		// TODO: use info.VersionedObject as the value?
  
  		// objects that are not part of api.Scheme must be converted to JSON
  		// TODO: convert to map[string]interface{}, attach to runtime.Unknown?
  		if len(version) > 0 {
  			if _, err := api.Scheme.ObjectKind(info.Object); runtime.IsNotRegisteredError(err) {
  				// TODO: ideally this would encode to version, but we don't expose multiple codecs here.
  				data, err := runtime.Encode(encoder, info.Object)
  				if err != nil {
  					return nil, err
  				}
  				objects = append(objects, &runtime.Unknown{RawJSON: data})
  				continue
  			}
  		}
  
  		converted, err := tryConvert(info.Mapping.ObjectConvertor, info.Object, version, info.Mapping.GroupVersionKind.GroupVersion().String())
  		if err != nil {
  			return nil, err
  		}
  		objects = append(objects, converted)
  	}
  	return objects, nil
  }
docs: // AsVersionedObjects converts a list of infos into versioned objects. The provided
  // version will be preferred as the conversion target, but the Object's mapping version will be
  // used if that version is not present.