def unused_import_module_name(messages):
pattern = r'<STR_LIT>'<EOL>for message in messages:<EOL><INDENT>if isinstance(message, pyflakes.messages.UnusedImport):<EOL><INDENT>module_name = re.search(pattern, str(message))<EOL>module_name = module_name.group()[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL>if module_name:<EOL><INDENT>yield (message.lineno, module_name)<EOL><DEDENT><DEDENT><DEDENT>
Yield line number and module name of unused imports.