code: func GetModifiedConfiguration(obj runtime.Object, annotate bool, codec runtime.Encoder) ([]byte, error) {
  	// First serialize the object without the annotation to prevent recursion,
  	// then add that serialization to it as the annotation and serialize it again.
  	var modified []byte
  
  	// Otherwise, use the server side version of the object.
  	// Get the current annotations from the object.
  	annots, err := metadataAccessor.Annotations(obj)
  	if err != nil {
  		return nil, err
  	}
  
  	if annots == nil {
  		annots = map[string]string{}
  	}
  
  	original := annots[v1.LastAppliedConfigAnnotation]
  	delete(annots, v1.LastAppliedConfigAnnotation)
  	if err := metadataAccessor.SetAnnotations(obj, annots); err != nil {
  		return nil, err
  	}
  
  	modified, err = runtime.Encode(codec, obj)
  	if err != nil {
  		return nil, err
  	}
  
  	if annotate {
  		annots[v1.LastAppliedConfigAnnotation] = string(modified)
  		if err := metadataAccessor.SetAnnotations(obj, annots); err != nil {
  			return nil, err
  		}
  
  		modified, err = runtime.Encode(codec, obj)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	// Restore the object to its original condition.
  	annots[v1.LastAppliedConfigAnnotation] = original
  	if err := metadataAccessor.SetAnnotations(obj, annots); err != nil {
  		return nil, err
  	}
  
  	return modified, nil
  }
docs: // GetModifiedConfiguration retrieves the modified configuration of the object.
  // If annotate is true, it embeds the result as an annotation in the modified
  // configuration. If an object was read from the command input, it will use that
  // version of the object. Otherwise, it will use the version from the server.