def module_build(self, module, modname=None):
node = None<EOL>path = getattr(module, "<STR_LIT>", None)<EOL>if path is not None:<EOL><INDENT>path_, ext = os.path.splitext(modutils._path_from_filename(path))<EOL>if ext in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>") and os.path.exists(path_ + "<STR_LIT>"):<EOL><INDENT>node = self.file_build(path_ + "<STR_LIT>", modname)<EOL><DEDENT><DEDENT>if node is None:<EOL><INDENT>node = self.inspect_build(module, modname=modname, path=path)<EOL>if self._apply_transforms:<EOL><INDENT>node = self._manager.visit_transforms(node)<EOL><DEDENT><DEDENT>return node<EOL>
Build an astroid from a living module instance.