code: func accessModesIndexFunc(obj interface{}) ([]string, error) {
  	if pv, ok := obj.(*v1.PersistentVolume); ok {
  		modes := v1helper.GetAccessModesAsString(pv.Spec.AccessModes)
  		return []string{modes}, nil
  	}
  	return []string{""}, fmt.Errorf("object is not a persistent volume: %v", obj)
  }
docs: // accessModesIndexFunc is an indexing function that returns a persistent
  // volume's AccessModes as a string