def is_path_valid(self, path):
    'Returns True if the path is valid from the current node position or False otherwise'
    null_state = [0 for i in range(len(self.node_names))]
    null_state_matrix = np.matrix(null_state).T
    new_state = np.matrix(self.state).T
    for (index, edge) in enumerate(path):
        edge_position = self.edges.index(edge)
        move_matrix = self.edge_matrices[edge_position]
        new_state = (move_matrix * new_state)
        if (new_state.any() == null_state_matrix.any()):
            return False
    return True
Returns True if the path is valid from the current node position or False otherwise
def is_path_valid(self, path):
    
    null_state = [0 for i in range(len(self.node_names))]
    null_state_matrix = np.matrix(null_state).T
    new_state = np.matrix(self.state).T
    for (index, edge) in enumerate(path):
        edge_position = self.edges.index(edge)
        move_matrix = self.edge_matrices[edge_position]
        new_state = (move_matrix * new_state)
        if (new_state.any() == null_state_matrix.any()):
            return False
    return True