Restore takePartition to PythonRDD, context.py
This is to avoid removing functions in minor releases.