code: def format_frame(
      self, frame: Union[FrameInfo, FrameType, TracebackType]
  ) -> dict:
      if not isinstance(frame, FrameInfo):
          frame = FrameInfo(frame, self.options)
  
      result = dict(
          name=(
              frame.executing.code_qualname()
              if self.use_code_qualname
              else frame.code.co_name
          ),
          filename=frame.filename,
          lineno=frame.lineno,
          lines=list(self.format_lines(frame.lines)),
      )
      if self.show_variables:
          result["variables"] = list(self.format_variables(frame))
      return result
  
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 7 for calling the Serializer obj's underlying member method code with example usage: obj.format_frame(frame) and returns: result