code: def test_productionlist2(app):
      text = (
          ".. productionlist:: P2\n"
          "   A: `:A` `A`\n"
          "   B: `P1:B` `~P1:B`\n"
      )
      doctree = restructuredtext.parse(app, text)
      refnodes = list(doctree.findall(pending_xref))
      assert_node(refnodes[0], pending_xref, reftarget="A")
      assert_node(refnodes[1], pending_xref, reftarget="P2:A")
      assert_node(refnodes[2], pending_xref, reftarget="P1:B")
      assert_node(refnodes[3], pending_xref, reftarget="P1:B")
      assert_node(refnodes[0], [pending_xref, nodes.literal, "A"])
      assert_node(refnodes[1], [pending_xref, nodes.literal, "A"])
      assert_node(refnodes[2], [pending_xref, nodes.literal, "P1:B"])
      assert_node(refnodes[3], [pending_xref, nodes.literal, "B"])
  
imports: from unittest import mock
  import pytest
  from docutils import nodes
  from docutils.nodes import definition, definition_list, definition_list_item, term
  from html5lib import HTMLParser
  from sphinx import addnodes
  from sphinx.addnodes import desc, desc_addname, desc_content, desc_name, desc_signature, glossary, index, pending_xref
  from sphinx.domains.std import StandardDomain
  from sphinx.testing import restructuredtext
  from sphinx.testing.util import assert_node
label_desc: Use image node_id 17 for calling a global function with example usage: test_productionlist2(app) without return types