def _wrap_code(self, source):
        head_template = '{} {} {}'
        no_time_template = '{:6} {:7} {:>4} {}'
        template = '<span style=\'color: Red\'>{:06.2f}</span> {:>7} {:>4} {}'
        time = '<span style=\'color: Red; font-weight: bold\'>Time</span>   '
        yield 0, head_template.format(time, ' Calls',
                                      ' <strong>Code</strong>\n')
        # j keeps track of position within ltimings
        j = 0
        for i, line in source:
            lineno = self.lineno
            if j < len(self.ltimings) and lineno == self.ltimings[j][0]:
                lcalls = self.ltimings[j][1]
                ltime = self.ltimings[j][2] * 1e-6
                yield i, template.format(ltime, lcalls, lineno, line)
                j += 1
            else:
                yield i, no_time_template.format('', '', lineno, line)
            self.lineno += 1
dataset/ETHPy150Open j-towns/iprofiler/iprofiler.py/LProfileFormatter._wrap_code/original