code: def format_stack(self, frame_or_tb=None) -> List[dict]:
      if frame_or_tb is None:
          frame_or_tb = inspect.currentframe().f_back
  
      return list(
          self.format_stack_data(
              FrameInfo.stack_data(
                  frame_or_tb,
                  self.options,
                  collapse_repeated_frames=self.collapse_repeated_frames,
              )
          )
      )
  
imports: import inspect
  import logging
  import sys
  import traceback
  from collections import Counter
  from html import escape
  from types import FrameType, TracebackType
  from typing import Union, Iterable, List
  from stack_data import style_with_executing_node, Options, Line, FrameInfo, Variable, RepeatedFrames
  from stack_data.utils import some_str
label_desc: Use image node_id 4 for calling the Serializer obj's underlying member method code with example usage: obj.format_stack(frame_or_tb) and returns: list