code: def setup(app):
      # probably we will be making a wrapper around autodoc
      app.setup_extension("sphinx.ext.autodoc")
  
      # would it be useful to define a new domain?
      # app.add_domain(QtDomain)
  
      ## Add new configuration options
      app.add_config_value("todo_include_todos", False, False)
  
      ## Nodes are the basic objects representing documentation directives
      ## and roles
      app.add_node(Todolist)
      app.add_node(
          Todo,
          html=(visit_todo_node, depart_todo_node),
          latex=(visit_todo_node, depart_todo_node),
          text=(visit_todo_node, depart_todo_node),
      )
  
      ## New directives like ".. todo:"
      app.add_directive("todo", TodoDirective)
      app.add_directive("todolist", TodolistDirective)
  
      ## Connect callbacks to specific hooks in the build process
      app.connect("doctree-resolved", process_todo_nodes)
      app.connect("env-purge-doc", purge_todos)
  
file_path: pyqtgraph/doc/extensions/qt_doc.py
imports: from docutils import nodes
  from sphinx.util.compat import Directive
  from sphinx.util.compat import make_admonition
label_desc: Use image node_id 1 for calling a global function with example usage: setup(app) without return types