For imported module, is it possible to get the importing module (name)? I\'m wondering if inspect can achieve it or not~
import inspect
result = filter(lambda v:inspect.ismodule(v), globals().values())
#result is a collection of all imported modules in the file, the name of any of which can be easily got by .__name__
#replace globals() with inspect.getmembers(wanted_module) if you want the result outside the wanted module