def dsu_sort(idx, seq):
    """Sorts a list of tuples according to the idx column using a Decorate-Sort-Undecorate method"""

    for i, e in enumerate(seq):
        seq[i] = (e[idx], e)
    seq.sort()
    seq.reverse()
    for i, e in enumerate(seq):
        seq[i] = e[1]
    return seq