Created factor_er.py

The whole deal