code: func (vs *volumeSnapshotter) takeSnapshot(
  	snapshot *crdv1.VolumeSnapshot,
  	pv *v1.PersistentVolume,
  	tags *map[string]string,
  ) (*crdv1.VolumeSnapshotDataSource, *[]crdv1.VolumeSnapshotCondition, error) {
  	spec := &pv.Spec
  	volumeType := crdv1.GetSupportedVolumeFromPVSpec(spec)
  	if len(volumeType) == 0 {
  		return nil, nil, fmt.Errorf("unsupported volume type found in PV %#v", spec)
  	}
  	plugin, ok := (*vs.volumePlugins)[volumeType]
  	if !ok {
  		return nil, nil, fmt.Errorf("%s is not supported volume for %#v", volumeType, spec)
  	}
  
  	snapDataSource, snapConditions, err := plugin.SnapshotCreate(snapshot, pv, tags)
  	if err != nil {
  		glog.Warningf("failed to snapshot %#v, err: %v", spec, err)
  	} else {
  		glog.Infof("snapshot created: %v. Conditions: %#v", snapDataSource, snapConditions)
  		return snapDataSource, snapConditions, nil
  	}
  	return nil, nil, nil
  }
docs: // This is the function responsible for determining the correct volume plugin to use,
  // asking it to make a snapshot and assigning it some name that it returns to the caller.