How to detect when a Python class uses a private internal module?