code: func (s *SelectorSpread) CalculateSpreadPriorityMap(pod *v1.Pod, meta interface{}, nodeInfo *schedulernodeinfo.NodeInfo) (schedulerapi.HostPriority, error) {
  	var selectors []labels.Selector
  	node := nodeInfo.Node()
  	if node == nil {
  		return schedulerapi.HostPriority{}, fmt.Errorf("node not found")
  	}
  
  	priorityMeta, ok := meta.(*priorityMetadata)
  	if ok {
  		selectors = priorityMeta.podSelectors
  	} else {
  		selectors = getSelectors(pod, s.serviceLister, s.controllerLister, s.replicaSetLister, s.statefulSetLister)
  	}
  
  	if len(selectors) == 0 {
  		return schedulerapi.HostPriority{
  			Host:  node.Name,
  			Score: int(0),
  		}, nil
  	}
  
  	count := countMatchingPods(pod.Namespace, selectors, nodeInfo)
  
  	return schedulerapi.HostPriority{
  		Host:  node.Name,
  		Score: count,
  	}, nil
  }
docs: // CalculateSpreadPriorityMap spreads pods across hosts, considering pods
  // belonging to the same service,RC,RS or StatefulSet.
  // When a pod is scheduled, it looks for services, RCs,RSs and StatefulSets that match the pod,
  // then finds existing pods that match those selectors.
  // It favors nodes that have fewer existing matching pods.
  // i.e. it pushes the scheduler towards a node where there's the smallest number of
  // pods which match the same service, RC,RSs or StatefulSets selectors as the pod being scheduled.