def find_all_connecting(graph, start, end):
    if start == end:
        return set()

    Gsucc = graph.succ
    Gpred = graph.pred

    fwdset = set()
    backset = set()

    tmplst = [end]
    while tmplst:
        node = tmplst.pop()
        if node in backset:
            continue
        backset.add(node)
        tmplst.extend(Gpred[node].keys())

    tmplst = [start]
    while tmplst:
        node = tmplst.pop()
        if node in fwdset:
            continue
        fwdset.add(node)
        tmplst.extend(Gsucc[node].keys())

    return fwdset.intersection(backset)
Validate a diff.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/depgraph.py/find_all_connecting--crossover with--dataset/ETHPy150Open reviewboard/rbtools/rbtools/api/resource.py/ValidateDiffResource.validate_diff