def get_shortened_stack(self, frame, tb):
    (stack, index) = self.get_stack(frame, tb)
    for (i, (s_frame, lineno)) in enumerate(stack):
        if ((s_frame is self.bottom_frame) and (index >= i)):
            stack = stack[i:]
            index -= i
    return (stack, index)
def get_shortened_stack(self, frame, tb):
    (stack, index) = self.get_stack(frame, tb)
    for (i, (s_frame, lineno)) in enumerate(stack):
        if ((s_frame is self.bottom_frame) and (index >= i)):
            stack = stack[i:]
            index -= i
    return (stack, index)