code: func (r *Registry) Unregister(c Collector) bool {
  	var (
  		descChan    = make(chan *Desc, capDescChan)
  		descIDs     = map[uint64]struct{}{}
  		collectorID uint64 // Just a sum of the desc IDs.
  	)
  	go func() {
  		c.Describe(descChan)
  		close(descChan)
  	}()
  	for desc := range descChan {
  		if _, exists := descIDs[desc.id]; !exists {
  			collectorID += desc.id
  			descIDs[desc.id] = struct{}{}
  		}
  	}
  
  	r.mtx.RLock()
  	if _, exists := r.collectorsByID[collectorID]; !exists {
  		r.mtx.RUnlock()
  		return false
  	}
  	r.mtx.RUnlock()
  
  	r.mtx.Lock()
  	defer r.mtx.Unlock()
  
  	delete(r.collectorsByID, collectorID)
  	for id := range descIDs {
  		delete(r.descIDs, id)
  	}
  	// dimHashesByName is left untouched as those must be consistent
  	// throughout the lifetime of a program.
  	return true
  }
docs: // Unregister implements Registerer.