code: func (t *awsElasticBlockStoreCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) {
  	if pv == nil || pv.Spec.CSI == nil {
  		return nil, fmt.Errorf("pv is nil or CSI source not defined on pv")
  	}
  
  	csiSource := pv.Spec.CSI
  
  	ebsSource := &v1.AWSElasticBlockStoreVolumeSource{
  		VolumeID: csiSource.VolumeHandle,
  		FSType:   csiSource.FSType,
  		ReadOnly: csiSource.ReadOnly,
  	}
  
  	if partition, ok := csiSource.VolumeAttributes["partition"]; ok {
  		partValue, err := strconv.Atoi(partition)
  		if err != nil {
  			return nil, fmt.Errorf("Failed to convert partition %v to integer: %v", partition, err)
  		}
  		ebsSource.Partition = int32(partValue)
  	}
  
  	pv.Spec.CSI = nil
  	pv.Spec.AWSElasticBlockStore = ebsSource
  	return pv, nil
  }
docs: // TranslateCSIPVToInTree takes a PV with CSIPersistentVolumeSource set and
  // translates the EBS CSI source to a AWSElasticBlockStore source.