def _check_relative_import(<EOL>self, modnode, importnode, importedmodnode, importedasname<EOL>):
if not self.linter.is_message_enabled("<STR_LIT>"):<EOL><INDENT>return None<EOL><DEDENT>if importedmodnode.file is None:<EOL><INDENT>return False  <EOL><DEDENT>if modnode is importedmodnode:<EOL><INDENT>return False  <EOL><DEDENT>if modnode.absolute_import_activated() or getattr(importnode, "<STR_LIT>", None):<EOL><INDENT>return False<EOL><DEDENT>if importedmodnode.name != importedasname:<EOL><INDENT>self.add_message(<EOL>"<STR_LIT>",<EOL>args=(importedasname, importedmodnode.name),<EOL>node=importnode,<EOL>)<EOL>return None<EOL><DEDENT>return None<EOL>
check relative import. node is either an Import or From node, modname
        the imported module name.