code: func GetPodAffinityTerms(podAffinity *v1.PodAffinity) (terms []v1.PodAffinityTerm) {
  	if podAffinity != nil {
  		if len(podAffinity.RequiredDuringSchedulingIgnoredDuringExecution) != 0 {
  			terms = podAffinity.RequiredDuringSchedulingIgnoredDuringExecution
  		}
  		// TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution.
  		//if len(podAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 {
  		//	terms = append(terms, podAffinity.RequiredDuringSchedulingRequiredDuringExecution...)
  		//}
  	}
  	return terms
  }
docs: // GetPodAffinityTerms gets pod affinity terms by a pod affinity object.