def _format_heatmap(self, filename, heatmap, execution_count):
with open(filename) as src_file:<EOL><INDENT>file_source = src_file.read().split('<STR_LIT:\n>')<EOL>skip_map = self._calc_skips(heatmap, len(file_source))<EOL><DEDENT>run_time = sum(time for time in heatmap.values())<EOL>return {<EOL>'<STR_LIT:name>': filename,<EOL>'<STR_LIT>': heatmap,<EOL>'<STR_LIT>': execution_count,<EOL>'<STR_LIT>': self._skip_lines(file_source, skip_map),<EOL>'<STR_LIT>': run_time<EOL>}<EOL>
Formats heatmap for UI.