def build_messages_metrics(messages):
count_types = collections.Counter(<EOL>line.get('<STR_LIT:type>') or None<EOL>for line in messages)<EOL>count_modules = collections.Counter(<EOL>line.get('<STR_LIT>') or None<EOL>for line in messages)<EOL>count_symbols = collections.Counter(<EOL>line.get('<STR_LIT>') or None<EOL>for line in messages)<EOL>count_paths = collections.Counter(<EOL>line.get('<STR_LIT:path>') or None<EOL>for line in messages)<EOL>return {<EOL>'<STR_LIT>': count_types,<EOL>'<STR_LIT>': count_modules,<EOL>'<STR_LIT>': count_symbols,<EOL>'<STR_LIT>': count_paths,<EOL>}<EOL>
Build reports's metrics