Reduce Function In Pyspark