def node_gen():
    for (fn, bn) in zip(fs, bs):
        (yield (fn, bn, []))
    res = [g[i] for i in shortest]
    for _ in range(int((len(fs) * blinking_ratio))):
        (yield (_, _, res))
def node_gen():
    for (fn, bn) in zip(fs, bs):
        (yield (fn, bn, []))
    res = [g[i] for i in shortest]
    for _ in range(int((len(fs) * blinking_ratio))):
        (yield (_, _, res))