code: func (t *awsElasticBlockStoreCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) {
  	if pv == nil || pv.Spec.AWSElasticBlockStore == nil {
  		return nil, fmt.Errorf("pv is nil or AWS EBS not defined on pv")
  	}
  
  	ebsSource := pv.Spec.AWSElasticBlockStore
  
  	volumeHandle, err := KubernetesVolumeIDToEBSVolumeID(ebsSource.VolumeID)
  	if err != nil {
  		return nil, fmt.Errorf("failed to translate Kubernetes ID to EBS Volume ID %v", err)
  	}
  
  	csiSource := &v1.CSIPersistentVolumeSource{
  		Driver:       AWSEBSDriverName,
  		VolumeHandle: volumeHandle,
  		ReadOnly:     ebsSource.ReadOnly,
  		FSType:       ebsSource.FSType,
  		VolumeAttributes: map[string]string{
  			"partition": strconv.FormatInt(int64(ebsSource.Partition), 10),
  		},
  	}
  
  	pv.Spec.AWSElasticBlockStore = nil
  	pv.Spec.CSI = csiSource
  	return pv, nil
  }
docs: // TranslateInTreePVToCSI takes a PV with AWSElasticBlockStore set from in-tree
  // and converts the AWSElasticBlockStore source to a CSIPersistentVolumeSource