@check_messages(*MSGS)<EOL><INDENT>def visit_import(self, node):<DEDENT>
self._check_reimport(node)<EOL>self._check_import_as_rename(node)<EOL>modnode = node.root()<EOL>names = [name for name, _ in node.names]<EOL>if len(names) >= <NUM_LIT:2>:<EOL><INDENT>self.add_message("<STR_LIT>", args="<STR_LIT:U+002CU+0020>".join(names), node=node)<EOL><DEDENT>for name in names:<EOL><INDENT>self._check_deprecated_module(node, name)<EOL>self._check_preferred_module(node, name)<EOL>imported_module = self._get_imported_module(node, name)<EOL>if isinstance(node.parent, astroid.Module):<EOL><INDENT>self._check_position(node)<EOL><DEDENT>if isinstance(node.scope(), astroid.Module):<EOL><INDENT>self._record_import(node, imported_module)<EOL><DEDENT>if imported_module is None:<EOL><INDENT>continue<EOL><DEDENT>self._check_relative_import(modnode, node, imported_module, name)<EOL>self._add_imported_module(node, imported_module.name)<EOL><DEDENT>
triggered when an import statement is seen