code: func SetToFields(s fieldpath.Set) (metav1.Fields, error) {
  	var err error
  	f := newFields()
  	s.Iterate(func(path fieldpath.Path) {
  		if err != nil {
  			return
  		}
  		tf := f
  		for _, pe := range path {
  			var str string
  			str, err = PathElementString(pe)
  			if err != nil {
  				break
  			}
  			if _, ok := tf.Map[str]; ok {
  				tf = tf.Map[str]
  			} else {
  				tf.Map[str] = newFields()
  				tf = tf.Map[str]
  			}
  		}
  		tf.Map["."] = newFields()
  	})
  	f = removeUselessDots(f)
  	return f, err
  }
docs: // SetToFields creates a trie of fields from an input set of paths