'Format the stack frames of the traceback'

def format_records(self, records, last_unique, recursion_repeat):

    frames = []
    for r in records[:((last_unique + recursion_repeat) + 1)]:
        frames.append(self.format_record(*r))
    if recursion_repeat:
        frames.append(('...    last    %d    frames    repeated,    from    the    frame    below    ...\n' % recursion_repeat))
        frames.append(self.format_record(*records[((last_unique + recursion_repeat) + 1)]))
    return frames
