code: def setup(app):
      app.connect("doctree-resolved", toctree_check)
  
      app.add_config_value("toctree_check_whitelist", [], True)
  
file_path: nni/docs/extension/toctree_check.py
imports: import re
  from docutils import nodes
  from sphinx.application import Sphinx
  from sphinx.addnodes import toctree
  from sphinx.util.logging import getLogger
label_desc: Use image node_id 3 for calling a global function with example usage: setup(app) without return types