Python Preprocess Function Does Not Take Precedence