Per-tick group-by over a list of key/value pairs [(k, v)], collapsing each input list into [(k, [v])] — one entry per distinct key carrying the list of all its values. The output entry count equals the number of distinct keys in that list.
Group keyed records by their key inside a batch, then serialise the per-key value lists for analytics.
Build keyed pairs upstream, group them per tick, and forward the per-key bundles to a viewer.
[(k, v)] list is folded independently and value lists preserve encounter order within that list. Emits one output tick per input tick, but the entry count varies with the number of distinct keys in that list.