code: def get_stack(self, tb):
      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
  
imports: import linecache
  import os
  import tkinter
  from idlelib.debugobj import ObjectTreeItem, make_objecttreeitem
  from idlelib.tree import TreeNode, TreeItem, ScrolledCanvas
label_desc: Use image node_id 2 for calling the StackTreeItem obj's underlying member method code with example usage: obj.get_stack(tb) and returns: stack