code: func MergeResizeConditionOnPVC(
  	pvc *v1.PersistentVolumeClaim,
  	resizeConditions []v1.PersistentVolumeClaimCondition) *v1.PersistentVolumeClaim {
  	resizeConditionMap := map[v1.PersistentVolumeClaimConditionType]*resizeProcessStatus{}
  
  	for _, condition := range resizeConditions {
  		resizeConditionMap[condition.Type] = &resizeProcessStatus{condition, false}
  	}
  
  	oldConditions := pvc.Status.Conditions
  	newConditions := []v1.PersistentVolumeClaimCondition{}
  	for _, condition := range oldConditions {
  		// If Condition is of not resize type, we keep it.
  		if _, ok := knownResizeConditions[condition.Type]; !ok {
  			newConditions = append(newConditions, condition)
  			continue
  		}
  
  		if newCondition, ok := resizeConditionMap[condition.Type]; ok {
  			if newCondition.condition.Status != condition.Status {
  				newConditions = append(newConditions, newCondition.condition)
  			} else {
  				newConditions = append(newConditions, condition)
  			}
  			newCondition.processed = true
  		}
  	}
  
  	// append all unprocessed conditions
  	for _, newCondition := range resizeConditionMap {
  		if !newCondition.processed {
  			newConditions = append(newConditions, newCondition.condition)
  		}
  	}
  	pvc.Status.Conditions = newConditions
  	return pvc
  }
docs: // MergeResizeConditionOnPVC updates pvc with requested resize conditions
  // leaving other conditions untouched.