self of module-level function is not NULL on Python 3.