code: def test_get_last_stmt_bracketing(self):
      eq = self.assertEqual
      p = self.parser
      setcode = p.set_code
      bracketing = p.get_last_stmt_bracketing
  
      TestInfo = namedtuple("TestInfo", ["string", "bracket"])
      tests = (
          TestInfo("", ((0, 0),)),
          TestInfo("a\n", ((0, 0),)),
          TestInfo("()()\n", ((0, 0), (0, 1), (2, 0), (2, 1), (4, 0))),
          TestInfo(
              "(\n)()\n", ((0, 0), (0, 1), (3, 0), (3, 1), (5, 0))
          ),
          TestInfo("()\n()\n", ((3, 0), (3, 1), (5, 0))),
          TestInfo(
              "()(\n)\n", ((0, 0), (0, 1), (2, 0), (2, 1), (5, 0))
          ),
          TestInfo("(())\n", ((0, 0), (0, 1), (1, 2), (3, 1), (4, 0))),
          TestInfo(
              "(\n())\n", ((0, 0), (0, 1), (2, 2), (4, 1), (5, 0))
          ),
          # Same as matched test.
          TestInfo("{)(]\n", ((0, 0), (0, 1), (2, 0), (2, 1), (4, 0))),
          TestInfo(
              "(((())\n",
              ((0, 0), (0, 1), (1, 2), (2, 3), (3, 4), (5, 3), (6, 2)),
          ),
      )
  
      for test in tests:
          with self.subTest(string=test.string):
              setcode(test.string)
              eq(bracketing(), test.bracket)
  
imports: from idlelib import pyparse
  import unittest
  from collections import namedtuple
label_desc: Use image node_id 16 for calling the PyParseTest obj's underlying member method code with example usage: obj.test_get_last_stmt_bracketing() without return types