Try and make some more helper methods to make our mapPartitions example simpler