[TUTORIAL] How to apply the nogil interface to factor models