Add getNodesForPartition method