code: func GetUniqueVolumeNameFromSpec(
  	volumePlugin volume.VolumePlugin,
  	volumeSpec *volume.Spec) (v1.UniqueVolumeName, error) {
  	if volumePlugin == nil {
  		return "", fmt.Errorf(
  			"volumePlugin should not be nil. volumeSpec.Name=%q",
  			volumeSpec.Name())
  	}
  
  	volumeName, err := volumePlugin.GetVolumeName(volumeSpec)
  	if err != nil || volumeName == "" {
  		return "", fmt.Errorf(
  			"failed to GetVolumeName from volumePlugin for volumeSpec %q err=%v",
  			volumeSpec.Name(),
  			err)
  	}
  
  	return GetUniqueVolumeName(
  			volumePlugin.GetPluginName(),
  			volumeName),
  		nil
  }
docs: // GetUniqueVolumeNameFromSpec uses the given VolumePlugin to generate a unique
  // name representing the volume defined in the specified volume spec.
  // This returned name can be used to uniquely reference the actual backing
  // device, directory, path, etc. referenced by the given volumeSpec.
  // If the given plugin does not support the volume spec, this returns an error.