code: def format_stack(f=None, limit=None):
      
      if f is None:
          try:
              raise ZeroDivisionError
          except ZeroDivisionError:
              f = sys.exc_info()[2].tb_frame.f_back
      return format_list(extract_stack(f, limit))
docs: Shorthand for 'format_list(extract_stack(f, limit))'.