code: def test_missing_reference_disabled_domain(
      tmp_path, app, status, warning
  ):
      inv_file = tmp_path / "inventory"
      inv_file.write_bytes(inventory_v2)
      set_config(
          app,
          {
              "inv": ("https://docs.python.org/", str(inv_file)),
          },
      )
  
      # load the inventory and check if it's done correctly
      normalize_intersphinx_mapping(app, app.config)
      load_mappings(app)
  
      def case(*, term, doc, py):
          def assert_(rn, expected):
              if expected is None:
                  assert rn is None
              else:
                  assert rn.astext() == expected
  
          kwargs = {}
  
          node, contnode = fake_node(
              "std", "term", "a term", "a term", **kwargs
          )
          rn = missing_reference(app, app.env, node, contnode)
          assert_(rn, "a term" if term else None)
  
          node, contnode = fake_node(
              "std", "term", "inv:a term", "a term", **kwargs
          )
          rn = missing_reference(app, app.env, node, contnode)
          assert_(rn, "a term")
  
          node, contnode = fake_node(
              "std", "doc", "docname", "docname", **kwargs
          )
          rn = missing_reference(app, app.env, node, contnode)
          assert_(rn, "docname" if doc else None)
  
          node, contnode = fake_node(
              "std", "doc", "inv:docname", "docname", **kwargs
          )
          rn = missing_reference(app, app.env, node, contnode)
          assert_(rn, "docname")
  
          # an arbitrary ref in another domain
          node, contnode = fake_node(
              "py", "func", "module1.func", "func()", **kwargs
          )
          rn = missing_reference(app, app.env, node, contnode)
          assert_(rn, "func()" if py else None)
  
          node, contnode = fake_node(
              "py", "func", "inv:module1.func", "func()", **kwargs
          )
          rn = missing_reference(app, app.env, node, contnode)
          assert_(rn, "func()")
  
      # the base case, everything should resolve
      assert app.config.intersphinx_disabled_reftypes == []
      case(term=True, doc=True, py=True)
  
      # disabled a single ref type
      app.config.intersphinx_disabled_reftypes = ["std:doc"]
      case(term=True, doc=False, py=True)
  
      # disabled a whole domain
      app.config.intersphinx_disabled_reftypes = ["std:*"]
      case(term=False, doc=False, py=True)
  
      # disabled all domains
      app.config.intersphinx_disabled_reftypes = ["*"]
      case(term=False, doc=False, py=False)
  
imports: import http.server
  from unittest import mock
  import pytest
  from docutils import nodes
  from sphinx import addnodes
  from sphinx.ext.intersphinx import INVENTORY_FILENAME, _get_safe_url, _strip_basic_auth, fetch_inventory, inspect_main, load_mappings, missing_reference, normalize_intersphinx_mapping
  from sphinx.ext.intersphinx import setup
  from tests.test_util.test_util_inventory import inventory_v2, inventory_v2_not_having_version
  from tests.utils import http_server
label_desc: Use image node_id 10 for calling a global function with example usage: test_missing_reference_disabled_domain(tmp_path, app, status, warning) without return types