def reachable(items,iter_succ,key=lambda x:x):
    m,s,l,d = set(),list(items),[],set()
    while len(s) > 0:
        i = s.pop()
        k = key(i)
        if not k in d:
            if k not in m:
                s.append(i)
                s.extend(x for x in iter_succ(k) if key(x) != k)
                m.add(k)
            else:
                d.add(k)
                l.append(i)
    return list(reversed(l))
If the server is configured to delay commits, or previous requests
dataset/ETHPy150Open Microsoft/ivy/src/ivy/ivy_utils.py/reachable--crossover with--dataset/ETHPy150Open djc/couchdb-python/couchdb/client.py/Database.commit