code: func getMatchingAntiAffinityTopologyPairsOfPod(newPod *v1.Pod, existingPod *v1.Pod, node *v1.Node) (*topologyPairsMaps, error) {
  	affinity := existingPod.Spec.Affinity
  	if affinity == nil || affinity.PodAntiAffinity == nil {
  		return nil, nil
  	}
  
  	topologyMaps := newTopologyPairsMaps()
  	for _, term := range GetPodAntiAffinityTerms(affinity.PodAntiAffinity) {
  		selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector)
  		if err != nil {
  			return nil, err
  		}
  		namespaces := priorityutil.GetNamespacesFromPodAffinityTerm(existingPod, &term)
  		if priorityutil.PodMatchesTermsNamespaceAndSelector(newPod, namespaces, selector) {
  			if topologyValue, ok := node.Labels[term.TopologyKey]; ok {
  				pair := topologyPair{key: term.TopologyKey, value: topologyValue}
  				topologyMaps.addTopologyPair(pair, existingPod)
  			}
  		}
  	}
  	return topologyMaps, nil
  }
docs: // getMatchingAntiAffinityTopologyPairs calculates the following for "existingPod" on given node:
  // (1) Whether it has PodAntiAffinity
  // (2) Whether ANY AffinityTerm matches the incoming pod