code: def test_read_inventory_v2():
      f = BytesIO(inventory_v2)
      invdata = InventoryFile.load(f, "/util", posixpath.join)
  
      assert len(invdata["py:module"]) == 2
      assert invdata["py:module"]["module1"] == (
          "foo",
          "2.0",
          "/util/foo.html#module-module1",
          "Long Module desc",
      )
      assert invdata["py:module"]["module2"] == (
          "foo",
          "2.0",
          "/util/foo.html#module-module2",
          "-",
      )
      assert (
          invdata["py:function"]["module1.func"][2]
          == "/util/sub/foo.html#module1.func"
      )
      assert (
          invdata["c:function"]["CFunc"][2] == "/util/cfunc.html#CFunc"
      )
      assert (
          invdata["std:term"]["a term"][2]
          == "/util/glossary.html#term-a-term"
      )
      assert (
          invdata["std:term"]["a term including:colon"][2]
          == "/util/glossary.html#term-a-term-including-colon"
      )
  
file_path: sphinx/tests/test_util/test_util_inventory.py
imports: import os
  import posixpath
  import zlib
  from io import BytesIO
  import sphinx.locale
  from sphinx.testing.util import SphinxTestApp
  from sphinx.util.inventory import InventoryFile
label_desc: Use image node_id 2 for calling a global function with example usage: test_read_inventory_v2() without return types