code: func copyAndSetTargetKind(copy bool, obj Object, kind schema.GroupVersionKind) (Object, error) {
  	if copy {
  		obj = obj.DeepCopyObject()
  	}
  	setTargetKind(obj, kind)
  	return obj, nil
  }
docs: // copyAndSetTargetKind performs a conditional copy before returning the object, or an error if copy was not successful.