Create a private method `newPartitioner(numBlocks: Int)`.