def setup_dict(m):
    import random
    a = range(m)
    d = {}
    for i in range(m):
        key = random.choice(a)
        a.remove(key)
        d[key] = key
    return d
does insertion order matter?
dataset/ETHPy150Open scipy/scipy/scipy/weave/examples/dict_sort.py/setup_dict