class_docstr: Class that wraps builtin Traceback objects.
docstr: Converts to a dictionary representation. You can serialize the result to JSON as it only has
  builtin objects like dicts, lists, ints or strings.
docstr_tok: ["Converts","to","a","dictionary","representation",".","You","can","serialize","the","result","to","JSON","as","it","only","has","builtin","objects","like","dicts",",","lists",",","ints","or","strings","."]
code: def as_dict(self):
      """
      Converts to a dictionary representation. You can serialize the result to JSON as it only has
      builtin objects like dicts, lists, ints or strings.
      """
      if self.tb_next is None:
          tb_next = None
      else:
          tb_next = self.tb_next.to_dict()
  
      code = {
          "co_filename": self.tb_frame.f_code.co_filename,
          "co_name": self.tb_frame.f_code.co_name,
      }
      frame = {
          "f_globals": self.tb_frame.f_globals,
          "f_code": code,
          "f_lineno": self.tb_frame.f_lineno,
      }
      return {
          "tb_frame": frame,
          "tb_lineno": self.tb_lineno,
          "tb_next": tb_next,
      }
  
imports: import re
  import sys
  from types import CodeType
  from types import FrameType
  from types import TracebackType
label_desc: Use image node_id 4 for calling the Traceback obj's underlying member method code with example usage: obj.as_dict() and returns: dict