code: def test_domain_cpp_template_parameters_is_pack(
      param: str, is_pack: bool
  ):
      def parse_template_parameter(param: str):
          ast = parse("type", "template<" + param + "> X")
          return ast.templatePrefix.templates[0].params[0]
  
      ast = parse_template_parameter(param)
      assert ast.isPack == is_pack
  
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 23 for calling a global function with example usage: test_domain_cpp_template_parameters_is_pack(param, is_pack) and returns: ast