get_clusters function

Extracts events from a two-dimensional data stream