pyspark How can I collect together values without using combineByKey or any reduce?
<p>I am trying to implement my own simpler function than combineByKey which will basically just take in a function and an iterator and return key value pairs withh the function applied. </p>

<p>For example:
If I have rdd that looks like this: ([("x", 2), ("y", 1), ("x", 3)]) and a function that multiplies values together. I want to plug these both into my newly created function called collector and get this in return ([("x", 6), ("y", 1)]).</p>

<p>I want to make it as simple as possible but this is my first time coding in pyspark so I am not too sure how to start this.</p>