code: func (c *PodAffinityChecker) InterPodAffinityMatches(pod *v1.Pod, meta PredicateMetadata, nodeInfo *schedulernodeinfo.NodeInfo) (bool, []PredicateFailureReason, error) {
  	node := nodeInfo.Node()
  	if node == nil {
  		return false, nil, fmt.Errorf("node not found")
  	}
  	if failedPredicates, error := c.satisfiesExistingPodsAntiAffinity(pod, meta, nodeInfo); failedPredicates != nil {
  		failedPredicates := append([]PredicateFailureReason{ErrPodAffinityNotMatch}, failedPredicates)
  		return false, failedPredicates, error
  	}
  
  	// Now check if <pod> requirements will be satisfied on this node.
  	affinity := pod.Spec.Affinity
  	if affinity == nil || (affinity.PodAffinity == nil && affinity.PodAntiAffinity == nil) {
  		return true, nil, nil
  	}
  	if failedPredicates, error := c.satisfiesPodsAffinityAntiAffinity(pod, meta, nodeInfo, affinity); failedPredicates != nil {
  		failedPredicates := append([]PredicateFailureReason{ErrPodAffinityNotMatch}, failedPredicates)
  		return false, failedPredicates, error
  	}
  
  	if klog.V(10) {
  		// We explicitly don't do klog.V(10).Infof() to avoid computing all the parameters if this is
  		// not logged. There is visible performance gain from it.
  		klog.Infof("Schedule Pod %+v on Node %+v is allowed, pod (anti)affinity constraints satisfied",
  			podName(pod), node.Name)
  	}
  	return true, nil, nil
  }
docs: // InterPodAffinityMatches checks if a pod can be scheduled on the specified node with pod affinity/anti-affinity configuration.
  // First return value indicates whether a pod can be scheduled on the specified node while the second return value indicates the
  // predicate failure reasons if the pod cannot be scheduled on the specified node.