code: def fix_provider_references(app, exception):
      """Sphinx "build-finished" event handler."""
      from sphinx.builders import html as builders
  
      if exception or not isinstance(
          app.builder, builders.StandaloneHTMLBuilder
      ):
          return
  
      # Replace `|version|` in the files that require manual substitution
      for path in Path(app.outdir).rglob("*.html"):
          if path.exists():
              lines = path.read_text().splitlines(True)
              with path.open("w") as output_file:
                  for line in lines:
                      output_file.write(
                          line.replace("|version|", app.config.version)
                      )
  
imports: from __future__ import annotations
  from pathlib import Path
label_desc: Use image node_id 1 for calling a global function with example usage: fix_provider_references(app, exception) without return types