def regroupRDDs(rdd, numGroup=10):
    """ regroup an rdd using a new key added that is 0-numGtoup-1

    :param rdd: input rdd as a (k,v) pairs
    :param numGroup: number of groups to concatenate to
    :return: a new rdd in the form of (groupNum, list of (k, v) in that group) pairs
    """
    rdd = rdd.map(lambda kv: (kv[0] % numGroup, (kv[0], kv[1])), preservesPartitioning=True)
    return rdd.groupByKey().mapValues(list)