def partition_edges_by_comp(edges, compmap=None, boundary_vars=()):
    if compmap is None:
        compmap = {}
    for u, v in edges:
        uparts = u.split('.', 1)
        vparts = v.split('.', 1)
        if len(uparts) == 1 or u in boundary_vars:
            srccomp = None
        else:
            srccomp = uparts[0]

        if len(vparts) == 1 or v in boundary_vars:
            destcomp = None
        else:
            destcomp = vparts[0]

        compmap.setdefault((srccomp,destcomp), []).append((u,v))

    return compmap
Takes a string containing source code and returns a generator over
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/nameutil.py/partition_edges_by_comp--crossover with--dataset/ETHPy150Open djc/runa/runac/parser.py/lex