code: func CalculatePatch(patch *Patch, encoder runtime.Encoder, mutateFn PatchFn) bool {
  	patch.Before, patch.Err = runtime.Encode(encoder, patch.Info.Object)
  	patch.After, patch.Err = mutateFn(patch.Info.Object)
  	if patch.Err != nil {
  		return true
  	}
  	if patch.After == nil {
  		return false
  	}
  
  	patch.Patch, patch.Err = strategicpatch.CreateTwoWayMergePatch(patch.Before, patch.After, patch.Info.Object)
  	return true
  }
docs: // CalculatePatch calls the mutation function on the provided info object, and generates a strategic merge patch for
  // the changes in the object. Encoder must be able to encode the info into the appropriate destination type.
  // This function returns whether the mutation function made any change in the original object.