def _add_imported_module(self, node, importedmodname):
module_file = node.root().file<EOL>context_name = node.root().name<EOL>base = os.path.splitext(os.path.basename(module_file))[<NUM_LIT:0>]<EOL>try:<EOL><INDENT>importedmodname = astroid.modutils.get_module_part(<EOL>importedmodname, module_file<EOL>)<EOL><DEDENT>except ImportError:<EOL><INDENT>pass<EOL><DEDENT>if context_name == importedmodname:<EOL><INDENT>self.add_message("<STR_LIT>", node=node)<EOL><DEDENT>elif not astroid.modutils.is_standard_module(importedmodname):<EOL><INDENT>if base != "<STR_LIT>" and context_name not in self._module_pkg:<EOL><INDENT>self._module_pkg[context_name] = context_name.rsplit("<STR_LIT:.>", <NUM_LIT:1>)[<NUM_LIT:0>]<EOL><DEDENT>importedmodnames = self.stats["<STR_LIT>"].setdefault(<EOL>importedmodname, set()<EOL>)<EOL>if context_name not in importedmodnames:<EOL><INDENT>importedmodnames.add(context_name)<EOL><DEDENT>self.import_graph[context_name].add(importedmodname)<EOL>if not self.linter.is_message_enabled("<STR_LIT>", line=node.lineno):<EOL><INDENT>self._excluded_edges[context_name].add(importedmodname)<EOL><DEDENT><DEDENT>
notify an imported module, used to analyze dependencies