code: def setup(app):
      app.add_config_value("missing_references_enabled", True, "env")
      app.add_config_value(
          "missing_references_write_json", False, "env"
      )
      app.add_config_value(
          "missing_references_warn_unused_ignores", True, "env"
      )
      app.add_config_value(
          "missing_references_filename",
          "missing-references.json",
          "env",
      )
  
      app.connect("builder-inited", prepare_missing_references_handler)
      app.connect("missing-reference", record_missing_reference_handler)
      app.connect("build-finished", save_missing_references_handler)
  
      return {"parallel_read_safe": True}
  
imports: from collections import defaultdict
  import json
  import logging
  from pathlib import Path
  from docutils.utils import get_source_line
  from docutils import nodes
  from sphinx.util import logging
  import matplotlib
label_desc: Use image node_id 10 for calling a global function with example usage: setup(app) and returns: dict