def METHOD_NAME(self, tb):
    if tb is None:
        tb = sys.last_traceback
    stack = []
    if tb and tb.tb_frame is None:
        tb = tb.tb_next
    while tb is not None:
        stack.append((tb.tb_frame, tb.tb_lineno))
        tb = tb.tb_next
    return stack