code: def test_domain_cpp_ast_type_definitions():
      check(
          "type",
          "public bool b",
          {1: "b", 2: "1b"},
          "{key}bool b",
          key="typedef",
      )
      check(
          "type",
          "{key}bool A::b",
          {1: "A::b", 2: "N1A1bE"},
          key="typedef",
      )
      check("type", "{key}bool *b", {1: "b", 2: "1b"}, key="typedef")
      check(
          "type", "{key}bool *const b", {1: "b", 2: "1b"}, key="typedef"
      )
      check(
          "type",
          "{key}bool *volatile const b",
          {1: "b", 2: "1b"},
          key="typedef",
      )
      check(
          "type",
          "{key}bool *volatile const b",
          {1: "b", 2: "1b"},
          key="typedef",
      )
      check(
          "type",
          "{key}bool *volatile const *b",
          {1: "b", 2: "1b"},
          key="typedef",
      )
      check("type", "{key}bool &b", {1: "b", 2: "1b"}, key="typedef")
      check("type", "{key}bool b[]", {1: "b", 2: "1b"}, key="typedef")
      check(
          "type",
          "{key}std::pair<int, int> coord",
          {1: "coord", 2: "5coord"},
          key="typedef",
      )
      check(
          "type",
          "{key}long long int foo",
          {1: "foo", 2: "3foo"},
          key="typedef",
      )
      check(
          "type",
          "{key}std::vector<std::pair<std::string, long long>> module::blah",
          {1: "module::blah", 2: "N6module4blahE"},
          key="typedef",
      )
      check(
          "type",
          "{key}std::function<void()> F",
          {1: "F", 2: "1F"},
          key="typedef",
      )
      check(
          "type",
          "{key}std::function<R(A1, A2)> F",
          {1: "F", 2: "1F"},
          key="typedef",
      )
      check(
          "type",
          "{key}std::function<R(A1, A2, A3)> F",
          {1: "F", 2: "1F"},
          key="typedef",
      )
      check(
          "type",
          "{key}std::function<R(A1, A2, A3, As...)> F",
          {1: "F", 2: "1F"},
          key="typedef",
      )
      check(
          "type",
          "{key}MyContainer::const_iterator",
          {
              1: "MyContainer::const_iterator",
              2: "N11MyContainer14const_iteratorE",
          },
      )
      check(
          "type",
          "public MyContainer::const_iterator",
          {
              1: "MyContainer::const_iterator",
              2: "N11MyContainer14const_iteratorE",
          },
          output="{key}MyContainer::const_iterator",
      )
      # test decl specs on right
      check(
          "type", "{key}bool const b", {1: "b", 2: "1b"}, key="typedef"
      )
      # test name in global scope
      check(
          "type",
          "{key}bool ::B::b",
          {1: "B::b", 2: "N1B1bE"},
          key="typedef",
      )
  
      check("type", "{key}A = B", {2: "1A"}, key="using")
      check("type", "{key}A = decltype(b)", {2: "1A"}, key="using")
  
      # from breathe#267 (named function parameters for function pointers
      check(
          "type",
          "{key}void (*gpio_callback_t)(struct device *port, uint32_t pin)",
          {1: "gpio_callback_t", 2: "15gpio_callback_t"},
          key="typedef",
      )
      check(
          "type",
          "{key}void (*f)(std::function<void(int i)> g)",
          {1: "f", 2: "1f"},
          key="typedef",
      )
  
      check(
          "type",
          "{key}T = A::template B<int>::template C<double>",
          {2: "1T"},
          key="using",
      )
  
      check("type", "{key}T = Q<A::operator()>", {2: "1T"}, key="using")
      check(
          "type",
          "{key}T = Q<A::operator()<int>>",
          {2: "1T"},
          key="using",
      )
      check(
          "type", "{key}T = Q<A::operator bool>", {2: "1T"}, key="using"
      )
  
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 6 for calling a global function with example usage: test_domain_cpp_ast_type_definitions() without return types