@staticmethod
def _get_partition_by_group(group_composite):
    """Get a hash of the grouping key,

        which is then used by partitioning
        function to get partition where the groups data should end up in.
        It uses hash % num_partitions to get partition
        """
    grouping_key = group_composite[0]
    grouping_key_hash = hash(grouping_key)
    return grouping_key_hash
