code: def test_missing_reference_pydomain(tmp_path, app, status, warning):
      inv_file = tmp_path / "inventory"
      inv_file.write_bytes(inventory_v2)
      set_config(
          app,
          {
              "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)
  
      # no context data
      kwargs = {}
      node, contnode = fake_node(
          "py", "func", "func", "func()", **kwargs
      )
      rn = missing_reference(app, app.env, node, contnode)
      assert rn is None
  
      # py:module context helps to search objects
      kwargs = {"py:module": "module1"}
      node, contnode = fake_node(
          "py", "func", "func", "func()", **kwargs
      )
      rn = missing_reference(app, app.env, node, contnode)
      assert rn.astext() == "func()"
  
      # py:attr context helps to search objects
      kwargs = {"py:module": "module1"}
      node, contnode = fake_node(
          "py", "attr", "Foo.bar", "Foo.bar", **kwargs
      )
      rn = missing_reference(app, app.env, node, contnode)
      assert rn.astext() == "Foo.bar"
  
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 6 for calling a global function with example usage: test_missing_reference_pydomain(tmp_path, app, status, warning) without return types