require(partitions.forall(rddPartitions.contains, "partition index out of range")), more intuitive?