'Helper function that returns lines with extra information.'

def get_annotated_lines(self):

    lines = [Line((idx + 1), x) for (idx, x) in enumerate(self.sourcelines)]
    if hasattr(self.code, 'co_firstlineno'):
        lineno = (self.code.co_firstlineno - 1)
        while (lineno > 0):
            if _funcdef_re.match(lines[lineno].code):
                break
            lineno -= 1
        try:
            offset = len(inspect.getblock([(x.code + '\n') for x in lines[lineno:]]))
        except TokenError:
            offset = 0
        for line in lines[lineno:(lineno + offset)]:
            line.in_frame = True
    try:
        lines[(self.lineno - 1)].current = True
    except IndexError:
        pass
    return lines
