code: func NewLeveledCompactor(ctx context.Context, r prometheus.Registerer, l log.Logger, ranges []int64, pool chunkenc.Pool) (*LeveledCompactor, error) {
  	if len(ranges) == 0 {
  		return nil, errors.Errorf("at least one range must be provided")
  	}
  	if pool == nil {
  		pool = chunkenc.NewPool()
  	}
  	if l == nil {
  		l = log.NewNopLogger()
  	}
  	return &LeveledCompactor{
  		ranges:    ranges,
  		chunkPool: pool,
  		logger:    l,
  		metrics:   newCompactorMetrics(r),
  		ctx:       ctx,
  	}, nil
  }
docs: // NewLeveledCompactor returns a LeveledCompactor.