title: How to see the contents of each partition in an RDD in pyspark?
body: <p>I want to learn a little more about how pyspark partitions data. I need a function such that:</p>
  
  <pre><code>a = sc.parallelize(range(10), 5)
  show_partitions(a)
  
  #output:[[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]] (or however it partitions)
  </code></pre>