code: def extract_stack(f=None, limit=None):
      """Extract the raw traceback from the current stack frame.
  
      The return value has the same format as for extract_tb().  The
      optional 'f' and 'limit' arguments have the same meaning as for
      print_stack().  Each item in the list is a quadruple (filename,
      line number, function name, text), and the entries are in order
      from oldest to newest stack frame.
      """
      if f is None:
          f = sys._getframe().f_back
      stack = StackSummary.extract(walk_stack(f), limit=limit)
      stack.reverse()
      return stack
  
imports: import collections.abc
  import itertools
  import linecache
  import sys
  import textwrap
  from contextlib import suppress
label_desc: Use image node_id 17 for calling a global function with example usage: extract_stack(f, limit) and returns: stack