code: func getPVSpecFromCache(name string, pvcReadOnly bool, expectedClaimUID types.UID, pvLister corelisters.PersistentVolumeLister) (*volume.Spec, error) {
  	pv, err := pvLister.Get(name)
  	if err != nil {
  		return nil, fmt.Errorf("failed to find PV %q in PVInformer cache: %v", name, err)
  	}
  
  	if pv.Spec.ClaimRef == nil {
  		return nil, fmt.Errorf(
  			"found PV object %q but it has a nil pv.Spec.ClaimRef indicating it is not yet bound to the claim",
  			name)
  	}
  
  	if pv.Spec.ClaimRef.UID != expectedClaimUID {
  		return nil, fmt.Errorf(
  			"found PV object %q but its pv.Spec.ClaimRef.UID (%q) does not point to claim.UID (%q)",
  			name,
  			pv.Spec.ClaimRef.UID,
  			expectedClaimUID)
  	}
  
  	// Do not return the object from the informer, since the store is shared it
  	// may be mutated by another consumer.
  	clonedPV := pv.DeepCopy()
  
  	return volume.NewSpecFromPersistentVolume(clonedPV, pvcReadOnly), nil
  }
docs: // getPVSpecFromCache fetches the PV object with the given name from the shared
  // internal PV store and returns a volume.Spec representing it.
  // This method returns an error if a PV object does not exist in the cache with
  // the given name.
  // This method deep copies the PV object so the caller may use the returned
  // volume.Spec object without worrying about it mutating unexpectedly.