code: func (p *MemPostings) SortedKeys() []labels.Label {
  	p.mtx.RLock()
  	keys := make([]labels.Label, 0, len(p.m))
  
  	for n, e := range p.m {
  		for v := range e {
  			keys = append(keys, labels.Label{Name: n, Value: v})
  		}
  	}
  	p.mtx.RUnlock()
  
  	sort.Slice(keys, func(i, j int) bool {
  		if d := strings.Compare(keys[i].Name, keys[j].Name); d != 0 {
  			return d < 0
  		}
  		return keys[i].Value < keys[j].Value
  	})
  	return keys
  }
docs: // SortedKeys returns a list of sorted label keys of the postings.