code: def format_frame(
      self, frame: Union[FrameInfo, FrameType, TracebackType]
  ) -> Iterable[str]:
      if not isinstance(frame, FrameInfo):
          frame = FrameInfo(frame, self.options)
  
      yield self.format_frame_header(frame)
  
      for line in frame.lines:
          if isinstance(line, Line):
              yield self.format_line(line)
          elif isinstance(line, BlankLineRange):
              yield self.format_blank_lines_linenumbers(line)
          else:
              assert_(line is LINE_GAP)
              yield self.line_gap_string + "\n"
  
      if self.show_variables:
          try:
              yield from self.format_variables(frame)
          except Exception:
              pass
  
imports: import inspect
  import sys
  import traceback
  from types import FrameType, TracebackType
  from typing import Union, Iterable
  from stack_data import style_with_executing_node, Options, Line, FrameInfo, LINE_GAP, Variable, RepeatedFrames, BlankLineRange, BlankLines
  from stack_data.utils import assert_
label_desc: Use image node_id 10 for calling the Formatter obj's underlying member method code with example usage: obj.format_frame(frame) without return types