code: func (s *attrStore) SetBulkAttrs(m map[uint64]map[string]interface{}) error {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  
  	attrs := make(map[uint64]map[string]interface{})
  	if err := s.db.Update(func(tx *bolt.Tx) error {
  		// Collect and sort keys.
  		ids := make([]uint64, 0, len(m))
  		for id := range m {
  			ids = append(ids, id)
  		}
  		sort.Slice(ids, func(i, j int) bool { return ids[i] < ids[j] })
  
  		// Update attributes for each id.
  		for _, id := range ids {
  			attr, err := txUpdateAttrs(tx, id, m[id])
  			if err != nil {
  				return err
  			}
  			attrs[id] = attr
  		}
  
  		return nil
  	}); err != nil {
  		return err
  	}
  
  	// Swap attributes map in cache.
  	for id, attr := range attrs {
  		s.attrCache.Set(id, attr)
  	}
  
  	return nil
  }
docs: // SetBulkAttrs sets attribute values for a set of ids.