` require(partitions.forall(rddPartitions.contains(_)), "partition index out of range")`  is more readable?