Add a helper to simplify using GraphIndex for grouping.