code: def ast_from_module(self, module, modname=None):
          
          modname = modname or module.__name__
          if modname in self.astroid_cache:
              return self.astroid_cache[modname]
          try:
              # some builtin modules don't have __file__ attribute
              filepath = module.__file__
              if modutils.is_python_source(filepath):
                  return self.ast_from_file(filepath, modname)
          except AttributeError:
              pass
          from astroid.builder import AstroidBuilder
  
          return AstroidBuilder(self).module_build(module, modname)
docs: given an imported module, return the astroid object