code: func NewMaxPDVolumeCountPredicate(
  	filterName string, pvInfo PersistentVolumeInfo, pvcInfo PersistentVolumeClaimInfo) FitPredicate {
  	var filter VolumeFilter
  	var volumeLimitKey v1.ResourceName
  
  	switch filterName {
  
  	case EBSVolumeFilterType:
  		filter = EBSVolumeFilter
  		volumeLimitKey = v1.ResourceName(volumeutil.EBSVolumeLimitKey)
  	case GCEPDVolumeFilterType:
  		filter = GCEPDVolumeFilter
  		volumeLimitKey = v1.ResourceName(volumeutil.GCEVolumeLimitKey)
  	case AzureDiskVolumeFilterType:
  		filter = AzureDiskVolumeFilter
  		volumeLimitKey = v1.ResourceName(volumeutil.AzureVolumeLimitKey)
  	case CinderVolumeFilterType:
  		filter = CinderVolumeFilter
  		volumeLimitKey = v1.ResourceName(volumeutil.CinderVolumeLimitKey)
  	default:
  		klog.Fatalf("Wrong filterName, Only Support %v %v %v ", EBSVolumeFilterType,
  			GCEPDVolumeFilterType, AzureDiskVolumeFilterType)
  		return nil
  
  	}
  	c := &MaxPDVolumeCountChecker{
  		filter:               filter,
  		volumeLimitKey:       volumeLimitKey,
  		maxVolumeFunc:        getMaxVolumeFunc(filterName),
  		pvInfo:               pvInfo,
  		pvcInfo:              pvcInfo,
  		randomVolumeIDPrefix: rand.String(32),
  	}
  
  	return c.predicate
  }
docs: // NewMaxPDVolumeCountPredicate creates a predicate which evaluates whether a pod can fit based on the
  // number of volumes which match a filter that it requests, and those that are already present.
  //
  // DEPRECATED
  // All cloudprovider specific predicates defined here are deprecated in favour of CSI volume limit
  // predicate - MaxCSIVolumeCountPred.
  //
  // The predicate looks for both volumes used directly, as well as PVC volumes that are backed by relevant volume
  // types, counts the number of unique volumes, and rejects the new pod if it would place the total count over
  // the maximum.