code: func MarshalToYamlForCodecs(obj runtime.Object, gv schema.GroupVersion, codecs serializer.CodecFactory) ([]byte, error) {
  	const mediaType = runtime.ContentTypeYAML
  	info, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), mediaType)
  	if !ok {
  		return []byte{}, errors.Errorf("unsupported media type %q", mediaType)
  	}
  
  	encoder := codecs.EncoderForVersion(info.Serializer, gv)
  	return runtime.Encode(encoder, obj)
  }
docs: // MarshalToYamlForCodecs marshals an object into yaml using the specified codec
  // TODO: Is specifying the gv really needed here?
  // TODO: Can we support json out of the box easily here?