def get_messages_by_line(messages):
line_messages = {}<EOL>for message in messages:<EOL><INDENT>line_messages[message.lineno] = message<EOL><DEDENT>return line_messages<EOL>
Return dictionary that maps line number to message.