code: func targetPodMatchesAffinityOfPod(pod, targetPod *v1.Pod) bool {
  	affinity := pod.Spec.Affinity
  	if affinity == nil || affinity.PodAffinity == nil {
  		return false
  	}
  	affinityProperties, err := getAffinityTermProperties(pod, GetPodAffinityTerms(affinity.PodAffinity))
  	if err != nil {
  		klog.Errorf("error in getting affinity properties of Pod %v", pod.Name)
  		return false
  	}
  	return podMatchesAllAffinityTermProperties(targetPod, affinityProperties)
  }
docs: // targetPodMatchesAffinityOfPod returns true if "targetPod" matches ALL affinity terms of
  // "pod". This function does not check topology.
  // So, whether the targetPod actually matches or not needs further checks for a specific
  // node.