def run_as_function(self):
        with CodeHeatmapCalculator() as prof:
            prof.add_code(self._run_object.__code__)
            self._run_object(*self._run_args, **self._run_kwargs)
        code_lines, start_line = inspect.getsourcelines(self._run_object)
        filename = inspect.getsourcefile(self._run_object)

        source_lines = []
        for line in code_lines:
            source_lines.append((start_line, line))
            start_line += 1

        object_name = 'function %s @ %s' % (
            self._run_object.__name__, filename)
        return [{
            'objectName': object_name,
            'heatmap': prof.heatmap[filename],
            'srcCode': source_lines,
        }]
args must be a list of arguments
dataset/ETHPy150Open nvdv/vprof/vprof/code_heatmap.py/CodeHeatmapProfile.run_as_function--crossover with--dataset/ETHPy150Open cowrie/cowrie/utils/fsctl.py/fseditCmd.mkfile