code: def do_import_module(self, modname=None):
          
          # handle special case where we are on a package node importing a module
          # using the same name as the package, which may end in an infinite loop
          # on relative imports
          # XXX: no more needed ?
          mymodule = self.root()
          level = getattr(self, "level", None)  # Import as no level
          if modname is None:
              modname = self.modname
          # XXX we should investigate deeper if we really want to check
          # importing itself: modname and mymodule.name be relative or absolute
          if mymodule.relative_to_absolute_name(modname, level) == mymodule.name:
              # FIXME: we used to raise InferenceError here, but why ?
              return mymodule
  
          return mymodule.import_module(
              modname, level=level, relative_only=level and level >= 1
          )
docs: return the ast for a module whose name is <modname> imported by <self>