pub fn as_collection<D: Data, L>(&self, mut logic: L) -> Collection<G, D, Tr::Diff>
        where
            L: FnMut(Tr::Key<'_>, Tr::Val<'_>) -> D+'static,
    {
        self.flat_map_ref(move |key, val| Some(logic(key,val)))
    }
Flattens the stream into a `Collection`.

The underlying `Stream<G, BatchWrapper<T::Batch>>` is a much more efficient way to access the data,
and this method should only be used when the data need to be transformed or exchanged, rather than
supplied as arguments to an operator using the same key-value structure.
differential-dataflow/src/operators/arrange/arrangement.rs