class_docstr: A list of FrameSummary objects, representing a stack of frames.
class_docstr_tok: ["A","list","of","FrameSummary","objects",",","representing","a","stack","of","frames","."]
docstr: Create a StackSummary from a traceback or stack object.
  
  :param frame_gen: A generator that yields (frame, lineno) tuples
      whose summaries are to be included in the stack.
  :param limit: None to include all frames or the number of frames to
      include.
  :param lookup_lines: If True, lookup lines for each frame immediately,
      otherwise lookup is deferred until the frame is rendered.
  :param capture_locals: If True, the local variables from each frame will
      be captured as object representations into the FrameSummary.
code: def extract(
      klass,
      frame_gen,
      *,
      limit=None,
      lookup_lines=True,
      capture_locals=False,
  ):
      """Create a StackSummary from a traceback or stack object.
  
      :param frame_gen: A generator that yields (frame, lineno) tuples
          whose summaries are to be included in the stack.
      :param limit: None to include all frames or the number of frames to
          include.
      :param lookup_lines: If True, lookup lines for each frame immediately,
          otherwise lookup is deferred until the frame is rendered.
      :param capture_locals: If True, the local variables from each frame will
          be captured as object representations into the FrameSummary.
      """
  
      def extended_frame_gen():
          for f, lineno in frame_gen:
              yield f, (lineno, None, None, None)
  
      return klass._extract_from_extended_frame_gen(
          extended_frame_gen(),
          limit=limit,
          lookup_lines=lookup_lines,
          capture_locals=capture_locals,
      )
  
imports: import collections.abc
  import itertools
  import linecache
  import sys
  import textwrap
  from contextlib import suppress
label_desc: Use image node_id 1 for calling the StackSummary obj's underlying member method code with example usage: obj.extract(klass, frame_gen) and returns: klass