code: def setup(app):
      # `html-page-context` event emitted when the HTML builder has
      # created a context dictionary to render a template with.
      app.connect("html-page-context", escape_for_chm)
      # `build-finished` event emitted when all the files have been
      # output.
      app.connect("build-finished", fixup_keywords)
  
      return {"version": "1.0", "parallel_read_safe": True}
  
file_path: cpython/Doc/tools/extensions/escape4chm.py
imports: import pathlib
  import re
  from html.entities import codepoint2name
  from sphinx.util.logging import getLogger
label_desc: Use image node_id 4 for calling a global function with example usage: setup(app) and returns: dict