code: func (sample *Sample) key() sampleKey {
  	ids := make([]string, len(sample.Location))
  	for i, l := range sample.Location {
  		ids[i] = strconv.FormatUint(l.ID, 16)
  	}
  
  	labels := make([]string, 0, len(sample.Label))
  	for k, v := range sample.Label {
  		labels = append(labels, fmt.Sprintf("%q%q", k, v))
  	}
  	sort.Strings(labels)
  
  	numlabels := make([]string, 0, len(sample.NumLabel))
  	for k, v := range sample.NumLabel {
  		numlabels = append(numlabels, fmt.Sprintf("%q%x%x", k, v, sample.NumUnit[k]))
  	}
  	sort.Strings(numlabels)
  
  	return sampleKey{
  		strings.Join(ids, "|"),
  		strings.Join(labels, ""),
  		strings.Join(numlabels, ""),
  	}
  }
docs: // key generates sampleKey to be used as a key for maps.