Introduce groupKeyFunction