code: func EnsureRacks(c context.Context, cfgs []*config.Datacenter, datacenterIds map[string]int64) (map[string]int64, error) {
  	t := &RacksTable{}
  	t.datacenters = datacenterIds
  	if err := t.fetch(c); err != nil {
  		return nil, errors.Annotate(err, "failed to fetch racks").Err()
  	}
  	if err := t.computeChanges(c, cfgs); err != nil {
  		return nil, errors.Annotate(err, "failed to compute changes").Err()
  	}
  	if err := t.add(c); err != nil {
  		return nil, errors.Annotate(err, "failed to add racks").Err()
  	}
  	if err := t.remove(c); err != nil {
  		return nil, errors.Annotate(err, "failed to remove racks").Err()
  	}
  	if err := t.update(c); err != nil {
  		return nil, errors.Annotate(err, "failed to update racks").Err()
  	}
  	return t.ids(c), nil
  }
docs: // EnsureRacks ensures the database contains exactly the given racks.
  // Returns a map of rack names to IDs in the database.