Implement nodesForPartitions