code: func getUpperPWLM(imgs Images, pos int) map[string]struct{} {
  	var pwlm map[string]struct{}
  	curlevel := imgs[pos].Level
  	// Start from our position and go back ignoring the other leafs.
  	for i := pos; i >= 0; i-- {
  		img := imgs[i]
  		if img.Level < curlevel && len(img.Im.PathWhitelist) > 0 {
  			pwlm = pwlToMap(img.Im.PathWhitelist)
  		}
  		curlevel = img.Level
  	}
  	return pwlm
  }
docs: // getUpperPWLM returns the pwl at the lower level for the branch where
  // img[pos] lives.