Should switch to 4-space indentation:

~~~
def estimateCost(
    ratings: RDD[Rating], 
    rank: Int, 
    userPartitioner: Partitioner,
    productPartitioner: Partitioner): (Seq[IterationCost], Seq[IterationCost]) {
~~~