The function is now back in toolbox.py and can be called with libs.toolbox.checkSession(session)