code: def fmt_summary(analysis):
      # XXX Support sorting and grouping.
      items = list(analysis)
      total = len(items)
  
      def section(name):
          _, render = build_section(name, items)
          yield from render()
  
      yield from section("types")
      yield from section("functions")
      yield from section("variables")
      yield from section("statements")
  
      yield ""
      #    yield f'grand total: {len(supported) + len(unsupported)}'
      yield f"grand total: {total}"
  
imports: import io
  import logging
  import os
  import os.path
  import re
  import sys
  from c_common import fsutil
  from c_common.logging import VERBOSITY, Printer
  from c_common.scriptutil import add_verbosity_cli, add_traceback_cli, add_sepval_cli, add_progress_cli, add_files_cli, add_commands_cli, process_args_by_key, configure_logger, get_prog, filter_filenames
  from c_parser.info import KIND
  from .match import filter_forward
  from .None import analyze, datafiles, check_all
label_desc: Use image node_id 7 for calling a global function with example usage: fmt_summary(analysis) without return types