Return the name of the module for a calling frame. The default depth returns the module containing the call to this API. A more typical use in a library will pass a depth of 1 to get the user's module rather than the library module. If no frame, module, or name can be found, returns None.
The official docs include a CPython implementation detail for this entry.