code: func getAffinityTermProperties(pod *v1.Pod, terms []v1.PodAffinityTerm) (properties []*affinityTermProperties, err error) {
  	if terms == nil {
  		return properties, nil
  	}
  
  	for _, term := range terms {
  		namespaces := priorityutil.GetNamespacesFromPodAffinityTerm(pod, &term)
  		selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector)
  		if err != nil {
  			return nil, err
  		}
  		properties = append(properties, &affinityTermProperties{namespaces: namespaces, selector: selector})
  	}
  	return properties, nil
  }
docs: // getAffinityTermProperties receives a Pod and affinity terms and returns the namespaces and
  // selectors of the terms.