code: def test_domain_cpp_ast_xref_parsing():
      def check(target):
          class Config:
              cpp_id_attributes = ["id_attr"]
              cpp_paren_attributes = ["paren_attr"]
  
          parser = DefinitionParser(
              target, location=None, config=Config()
          )
          ast, isShorthand = parser.parse_xref_object()
          parser.assert_end()
  
      check("f")
      check("f()")
      check("void f()")
      check("T f()")
  
imports: import itertools
  import re
  import zlib
  import pytest
  import sphinx.domains.cpp
  from sphinx import addnodes
  from sphinx.addnodes import desc, desc_content, desc_name, desc_parameter, desc_parameterlist, desc_sig_name, desc_sig_space, desc_signature, desc_signature_line, pending_xref
  from sphinx.domains.cpp import DefinitionError, DefinitionParser, NoOldIdError, Symbol, _id_prefix, _max_id
  from sphinx.ext.intersphinx import load_mappings, normalize_intersphinx_mapping
  from sphinx.testing import restructuredtext
  from sphinx.testing.util import assert_node
  from sphinx.writers.text import STDINDENT
label_desc: Use image node_id 22 for calling a global function with example usage: test_domain_cpp_ast_xref_parsing() without return types