def _consolidate_srcs(self):
        d = self._get_duped_varnodes()

        newnodes = []
        for src, nodes in d.items():
            alldests = set()
            for n in nodes:
                alldests.update(n[1])
            if src in alldests:
                alldests.remove(src)
                alldests = [src]+sorted(alldests)
            else:
                alldests = sorted(alldests)
            newname = (src, tuple(alldests))
            newnodes.append((newname, merge_metadata(self, nodes), nodes))

        for newname, meta, nodes in newnodes:
            self.add_node(newname, **meta)
            collapse_nodes(self, newname, nodes)

        return self
consolidate any varnodes with a common src.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/depgraph.py/CollapsedGraph._consolidate_srcs