def _check_unset_req_vars(self):
        """Find 'required' variables that have not been set."""
        graph = self._depgraph
        for name in chain(all_comps(graph),
                          graph.get_boundary_inputs(),
                          graph.get_boundary_outputs()):
            obj = getattr(self, name)
            if has_interface(obj, IContainer):
                for vname in obj.get_req_default(self.trait(name).required):
                    # each var must be connected, otherwise value will not
                    # be set to a non-default value
                    base = base_var(graph, vname)
                    indeg = graph.in_degree(base)
                    io = graph.node[base]['iotype']
                    if (io == 'in' and 1 < indeg) or \
                       (io == 'state' and indeg < 2):
                        self.raise_exception("required variable '%s' was"
                                             " not set" % vname, RuntimeError)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/assembly.py/Assembly._check_unset_req_vars/swapped operands of `<`