def setup_depgraph(self, dgraph=None):
        # create our depgraph
        self._depgraph = DependencyGraph()

        # add all of the components and their var nodes, and any of
        # our own variables as boundary var nodes.
        for name in self.list_inputs():
            self._depgraph.add_boundary_var(self, name,
                                            iotype='in')

        for name in self.list_outputs():
            self._depgraph.add_boundary_var(self, name,
                                            iotype='out')

        for cname in self.list_containers():
            obj = getattr(self, cname)
            if cname not in self._depgraph and has_interface(obj, IComponent):
                self._depgraph.add_component(cname, obj)

        # add our connections to the graph.  Some connections, e.g.,
        # connections with unit conversions and connections involving
        # multivariable source expressions, will require the creation of
        # PseudoComponents.  These must also be represented in the graph.
        for srcexpr, destexpr in self._connections:
            src = srcexpr.text
            dest = destexpr.text
            try:
                pcomp_type = self._needs_pseudo(srcexpr, destexpr)
                if pcomp_type:
                    if pcomp_type == 'units':
                        pseudocomp = UnitConversionPComp(self, srcexpr, destexpr,
                                                         pseudo_type=pcomp_type)
                    else:
                        pseudocomp = PseudoComponent(self, srcexpr, destexpr,
                                                     pseudo_type=pcomp_type)
                    pseudocomp.activate(self)
                else:
                    pseudocomp = None
                    self._depgraph.check_connect(src, dest)
                    dcomps = destexpr.get_referenced_compnames()
                    scomps = srcexpr.get_referenced_compnames()
                    for dname in dcomps:
                        if scomps in dname:
                            raise RuntimeError("Both refer to the same component.")
                    for cname in chain(dcomps, scomps):
                        comp = getattr(self, cname)
                        if has_interface(comp, IComponent):
                            comp.config_changed(update_parent=False)

                    for vname in chain(srcexpr.get_referenced_varpaths(copy=False),
                                       destexpr.get_referenced_varpaths(copy=False)):
                        if not self.contains(vname):
                            raise AttributeError("Can't find '%s'" % vname)

                    self._depgraph.connect(self, src, dest)
            except:
                self.reraise_exception("Can't connect '%s' to '%s': " %
                                             (src, dest), sys.exc_info())

        # add connections for params, constraints, etc.
        for cname in self.list_containers():
            obj = getattr(self, cname)
            if hasattr(obj, 'get_parameters'):
                for param in obj.get_parameters().values():
                    self._depgraph.add_param(obj.name, tuple(param.targets))

            if hasattr(obj, 'get_constraints'):
                for constraint in obj.get_constraints().values():
                    constraint.activate(obj)

            if hasattr(obj, 'get_2sided_constraints'):
                for constraint in obj.get_2sided_constraints().values():
                    constraint.activate(obj)

            if hasattr(obj, 'get_objectives'):
                for objective in obj.get_objectives().values():
                    objective.activate(obj)

            if hasattr(obj, 'get_responses'):
                for res in obj.get_responses().values():
                    res.activate(obj)

        for comp in self.get_comps():
            if has_interface(comp, IDriver) or has_interface(comp, IAssembly):
                comp.setup_depgraph(self._depgraph)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/assembly.py/Assembly.setup_depgraph/swapped operands of `in`