parents = defaultdict(list)
for a, bs in children.items():
    for b in bs:
        parents[b].append(a)
store = defaultdict(list)
for node in children.keys():
    store[tuple(sorted(children[node])), tuple(sorted(parents[node]))].append(
        node)
for s in store.values():
    if len(s) > 1:
        pass
Как идентифицировать несвязанных братьев и сестер на графике?