code: func (r *infoResult) vmPaths() (map[string]string, error) {
  	ctx := context.TODO()
  	paths := make(map[string]string)
  	for _, info := range r.mhas.Config.PowerInfo {
  		mes, err := mo.Ancestors(ctx, r.client, r.client.ServiceContent.PropertyCollector, info.Key)
  		if err != nil {
  			return nil, err
  		}
  
  		path := ""
  		for _, me := range mes {
  			// Skip root entity in building inventory path.
  			if me.Parent == nil {
  				continue
  			}
  			path += "/" + me.Name
  		}
  
  		paths[info.Key.Value] = path
  	}
  
  	return paths, nil
  }
docs: // vmPaths resolves the paths for the VMs in the result.