def set_node_state(self, node_name=None, state='default', reset=False):
        assert hasattr(self, 'graph')

        if node_name is None:
            node_name = self.state

        if reset:
            for n in self.graph.nodes_iter():
                self.set_node_style(n, 'default')
        if self.graph.has_node(node_name):
            node = self.graph.get_node(node_name)
            func = self.set_node_style
        else:
            path = node_name.split(NestedState.separator)
            node = self.graph
            while len(path) > 0:
                node = node.get_subgraph('cluster_'+ path.pop(0))
            func = self.set_graph_style
        try:
            func(node, state)
        except __HOLE__:
            func(node, 'default')
dataset/ETHPy150Open tyarkoni/transitions/transitions/extensions/diagrams.py/GraphMachine.set_node_state