class_docstr: Class that wraps builtin Traceback objects.
docstr: Creates an instance by parsing a stacktrace. Strict means that parsing stops when lines are not indented by at least two spaces
  anymore.
docstr_tok: ["Creates","an","instance","by","parsing","a","stacktrace",".","Strict","means","that","parsing","stops","when","lines","are","not","indented","by","at","least","two","spaces","anymore","."]
code: def from_string(cls, string, strict=True):
      """
      Creates an instance by parsing a stacktrace. Strict means that parsing stops when lines are not indented by at least two spaces
      anymore.
      """
      frames = []
      header = strict
  
      for line in string.splitlines():
          line = line.rstrip()
          if header:
              if line == "Traceback (most recent call last):":
                  header = False
              continue
          frame_match = FRAME_RE.match(line)
          if frame_match:
              frames.append(frame_match.groupdict())
          elif line.startswith("  "):
              pass
          elif strict:
              break  # traceback ended
  
      if frames:
          previous = None
          for frame in reversed(frames):
              previous = _AttrDict(
                  frame,
                  tb_frame=_AttrDict(
                      frame,
                      f_globals=_AttrDict(
                          __file__=frame["co_filename"],
                          __name__="?",
                      ),
                      f_code=_AttrDict(frame),
                      f_lineno=int(frame["tb_lineno"]),
                  ),
                  tb_next=previous,
              )
          return cls(previous)
      else:
          raise TracebackParseError(
              "Could not find any frames in %r." % string
          )
  
imports: import re
  import sys
  from types import CodeType
  from types import FrameType
  from types import TracebackType
label_desc: Use image node_id 6 for calling the Traceback obj's underlying member method code with example usage: obj.from_string(cls, string, strict) and returns: cls