code: func (b *Builder) Ring() *Ring {
  	ring := &Ring{
  		nodes:                    make([]*Node, len(b.nodes)),
  		groups:                   make([]*Group, len(b.groups)),
  		nodeToGroup:              make([]int, len(b.nodes)),
  		groupToGroup:             make([]int, len(b.groups)),
  		replicaToPartitionToNode: make([][]lowring.Node, len(b.ring.ReplicaToPartitionToNode)),
  		rebalanced:               b.ring.Rebalanced,
  	}
  	for i, n := range b.nodes {
  		ring.nodes[i] = &Node{
  			ring:     ring,
  			index:    i,
  			info:     n.info,
  			capacity: b.ring.NodeToCapacity[i],
  		}
  	}
  	for i, g := range b.groups {
  		ring.groups[i] = &Group{
  			ring:  ring,
  			index: i,
  			info:  g.info,
  		}
  	}
  	copy(ring.nodeToGroup, b.ring.NodeToGroup)
  	copy(ring.groupToGroup, b.ring.GroupToGroup)
  	replicaCount := len(b.ring.ReplicaToPartitionToNode)
  	partitionCount := len(b.ring.ReplicaToPartitionToNode[0])
  	for replica := 0; replica < replicaCount; replica++ {
  		ring.replicaToPartitionToNode[replica] = make([]lowring.Node, partitionCount)
  		copy(ring.replicaToPartitionToNode[replica], b.ring.ReplicaToPartitionToNode[replica])
  	}
  	return ring
  }
docs: // Ring returns an immutable copy of the assignment information contained in
  // the builder.