code: def get_imported_modules(self, module):
      
      for name, member in inspect.getmembers(module):
        if inspect.ismodule(member):
          yield name, member
docs: Returns the list of modules imported from `module`.