code: func NewRing(initialSet Iterable, windowSize int) *Ring {
  	if windowSize < 1 {
  		windowSize = 1
  	}
  	vc := &Ring{
  		buckets: make([]*Bucket, windowSize),
  		power:   NewTrimSet(),
  		size:    windowSize,
  	}
  	for i := 0; i < windowSize; i++ {
  		vc.buckets[i] = NewBucket()
  	}
  	if initialSet != nil {
  		vc.populated = 1
  		vc.buckets[0] = NewBucket(initialSet)
  	}
  	return vc
  }
docs: // Provides a sliding window over the last size buckets of validator power changes