code: func ValidateTopologySelectorTerm(term core.TopologySelectorTerm, fldPath *field.Path) (map[string]sets.String, field.ErrorList) {
  	allErrs := field.ErrorList{}
  	exprMap := make(map[string]sets.String)
  	exprPath := fldPath.Child("matchLabelExpressions")
  
  	// Allow empty MatchLabelExpressions, in case this field becomes optional in the future.
  	for i, req := range term.MatchLabelExpressions {
  		idxPath := exprPath.Index(i)
  		valueSet, exprErrs := validateTopologySelectorLabelRequirement(req, idxPath)
  		allErrs = append(allErrs, exprErrs...)
  
  		// Validate no duplicate keys exist.
  		if _, exists := exprMap[req.Key]; exists {
  			allErrs = append(allErrs, field.Duplicate(idxPath.Child("key"), req.Key))
  		}
  		exprMap[req.Key] = valueSet
  	}
  
  	return exprMap, allErrs
  }
docs: // ValidateTopologySelectorTerm tests that the specified topology selector term has valid data,
  // and constructs a map representing the term in raw form.