About the return type, it is the same as `List[(RDD[T], RDD[T])]`. The latter form is more common in Spark codebase. Also, can we change the return type to `Array[(RDD[T], RDD[T])]`, which is Java-friendly and there is no overhead because `numFolds` is small.