code: func filterPodsWithPDBViolation(pods []interface{}, pdbs []*policy.PodDisruptionBudget) (violatingPods, nonViolatingPods []*v1.Pod) {
  	for _, obj := range pods {
  		pod := obj.(*v1.Pod)
  		pdbForPodIsViolated := false
  		// A pod with no labels will not match any PDB. So, no need to check.
  		if len(pod.Labels) != 0 {
  			for _, pdb := range pdbs {
  				if pdb.Namespace != pod.Namespace {
  					continue
  				}
  				selector, err := metav1.LabelSelectorAsSelector(pdb.Spec.Selector)
  				if err != nil {
  					continue
  				}
  				// A PDB with a nil or empty selector matches nothing.
  				if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
  					continue
  				}
  				// We have found a matching PDB.
  				if pdb.Status.PodDisruptionsAllowed <= 0 {
  					pdbForPodIsViolated = true
  					break
  				}
  			}
  		}
  		if pdbForPodIsViolated {
  			violatingPods = append(violatingPods, pod)
  		} else {
  			nonViolatingPods = append(nonViolatingPods, pod)
  		}
  	}
  	return violatingPods, nonViolatingPods
  }
docs: // filterPodsWithPDBViolation groups the given "pods" into two groups of "violatingPods"
  // and "nonViolatingPods" based on whether their PDBs will be violated if they are
  // preempted.
  // This function is stable and does not change the order of received pods. So, if it
  // receives a sorted list, grouping will preserve the order of the input list.