def set_state(self, node_name, node_data):
    'Sets the graph state to be the state specified by node_name, and node_data'
    try:
        current_node_state_position = self.node_names.index(node_name)
        self.current_node = node_name
        self.data = node_data
        self.state = [0 for i in range(len(self.node_names))]
        self.state[current_node_state_position] = 1
        self.state_matrix = np.matrix(self.state).T
    except:
        print('Could not set the state of graph: {0}'.format(self.graph_name))
        raise
Sets the graph state to be the state specified by node_name, and node_data
def set_state(self, node_name, node_data):
    
    try:
        current_node_state_position = self.node_names.index(node_name)
        self.current_node = node_name
        self.data = node_data
        self.state = [0 for i in range(len(self.node_names))]
        self.state[current_node_state_position] = 1
        self.state_matrix = np.matrix(self.state).T
    except:
        print('Could not set the state of graph: {0}'.format(self.graph_name))
        raise