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 object from a supplied list of
  FrameSummary objects or old-style list of tuples.
code: def from_list(klass, a_list):
      """
      Create a StackSummary object from a supplied list of
      FrameSummary objects or old-style list of tuples.
      """
      # While doing a fast-path check for isinstance(a_list, StackSummary) is
      # appealing, idlelib.run.cleanup_traceback and other similar code may
      # break this by making arbitrary frames plain tuples, so we need to
      # check on a frame by frame basis.
      result = StackSummary()
      for frame in a_list:
          if isinstance(frame, FrameSummary):
              result.append(frame)
          else:
              filename, lineno, name, line = frame
              result.append(
                  FrameSummary(filename, lineno, name, line=line)
              )
      return result
  
imports: import collections.abc
  import itertools
  import linecache
  import sys
  import textwrap
  from contextlib import suppress
label_desc: Use image node_id 3 for calling the StackSummary obj's underlying member method code with example usage: obj.from_list(klass, a_list) and returns: result