code: func (e EdgeMap) Sort() []*Edge {
  	el := make(edgeList, 0, len(e))
  	for _, w := range e {
  		el = append(el, w)
  	}
  
  	sort.Sort(el)
  	return el
  }
docs: // Sort returns a slice of the edges in the map, in a consistent
  // order. The sort order is first based on the edge weight
  // (higher-to-lower) and then by the node names to avoid flakiness.