find_nodes returns a unique list of node ids