def prune_unconnected_vars(self):
        conns = self.list_connections()
        convars = set([u for u,v in conns])
        convars.update([v for u,v in conns])
        convars.update([base_var(self,v) for v in convars])
        to_remove = [v for v in self.nodes_iter()
                         if v not in convars and is_var_node(self,v)]
        self.remove_nodes_from(to_remove)
Return the contents of an object as a dict.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/depgraph.py/DependencyGraph.prune_unconnected_vars--crossover with--dataset/ETHPy150Open JoelBender/bacpypes/py27/bacpypes/apdu.py/APDU.dict_contents