spark `foreachPartition`, how to get an index of the partition (or sequence number, or something to identify the partition)?

```
val docs: RDD[String] = ...

println("num partitions: " + docs.getNumPartitions)

docs.foreachPartition((it: Iterator[String]) => {
  println("partition index: " + ???)
  it.foreach(...)
})

```