code: def setup(app):
      # See life-cycle of sphinx app here:
      # https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx-core-events
      patch = ClassNewBlacklistPatch()
      app.connect("env-before-read-docs", patch.patch)
      app.connect("env-merge-info", patch.restore)
  
      patch = ResolveDocPatch()
      app.connect("env-before-read-docs", patch.patch)
      app.connect("env-merge-info", patch.restore)
  
      app.connect("env-before-read-docs", disable_trace_patch)
  
      # autosummary generate happens at builder-inited
      app.connect("config-inited", trial_tool_import_patch)
  
      autosummary_patch = AutoSummaryPatch()
      app.connect("config-inited", autosummary_patch.patch)
      app.connect("env-merge-info", autosummary_patch.restore)
  
file_path: nni/docs/extension/patch_autodoc.py
imports: import inspect
  import os
  from typing import List, Tuple, List
  import sphinx
  from docutils import nodes
  from docutils.nodes import Node
label_desc: Use image node_id 3 for calling a global function with example usage: setup(app) without return types