def weighted_choice(mapping):
    # use roulette method
    rnd = random.random() * sum(mapping.values())
    for k, w in mapping.items():
        rnd -= w
        if rnd < 0:
            return k
Fake version of os.utime.
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/utils/random_sequence.py/weighted_choice--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/dev_appserver_import_hook.py/FakeUTime