class BroadcastingBucketBuilder implements MultiBucketBuilder {

    private final int numBuckets;
    private final StreamBucket.Builder bucketBuilder;

    public BroadcastingBucketBuilder(Streamer<?>[] streamers, int numBuckets, RamAccounting ramAccounting) {
        this.numBuckets = numBuckets;
        this.bucketBuilder = new StreamBucket.Builder(streamers, ramAccounting);
    }

    @Override
    public void add(Row row) {
        bucketBuilder.add(row);
    }

    @Override
    public int size() {
        return bucketBuilder.size();
    }

    @Override
    public long ramBytesUsed() {
        return bucketBuilder.ramBytesUsed();
    }

    @Override
    public void build(StreamBucket[] buckets) {<FILL_FUNCTION_BODY>}
}

        assert buckets.length == numBuckets : "length of the provided array must match numBuckets";
        StreamBucket bucket = bucketBuilder.build();
        bucketBuilder.reset();
        for (int i = 0; i < numBuckets; i++) {
            buckets[i] = bucket;
        }
    
<no_super_class>