This algorithm collects data elements according to provided tags. The tags are used as index of input streams, and it is expected that each input element is accompanied by a tag.