def run_as_module(self):
        """Runs program as module."""
        try:
            with open(self._run_object, 'r') as srcfile,\
                CodeHeatmapCalculator() as prof:
                src_code = srcfile.read()
                code = compile(src_code, self._run_object, 'exec')
                prof.add_code(code)
                exec(code, self._globs, None)
        except __HOLE__:
            pass
        source_lines = [(i + 1, l) for i, l in enumerate(src_code.split('\n'))]
        return [{
            'objectName': self._run_object,
            'heatmap': prof.heatmap[self._run_object],
            'srcCode': source_lines
        }]
dataset/ETHPy150Open nvdv/vprof/vprof/code_heatmap.py/CodeHeatmapProfile.run_as_module