code: func ConvertSelectorToLabelsMap(selector string) (Set, error) {
  	labelsMap := Set{}
  
  	if len(selector) == 0 {
  		return labelsMap, nil
  	}
  
  	labels := strings.Split(selector, ",")
  	for _, label := range labels {
  		l := strings.Split(label, "=")
  		if len(l) != 2 {
  			return labelsMap, fmt.Errorf("invalid selector: %s", l)
  		}
  		key := strings.TrimSpace(l[0])
  		if err := validateLabelKey(key); err != nil {
  			return labelsMap, err
  		}
  		value := strings.TrimSpace(l[1])
  		if err := validateLabelValue(value); err != nil {
  			return labelsMap, err
  		}
  		labelsMap[key] = value
  	}
  	return labelsMap, nil
  }
docs: // ConvertSelectorToLabelsMap converts selector string to labels map
  // and validates keys and values