Create reducer.py

Python reducer