code: def test_get_surrounding_bracket(self):
      get = self.get_parser
  
      def without_mustclose(parser):
          # a utility function to get surrounding bracket
          # with mustclose=False
          return parser.get_surrounding_brackets(mustclose=False)
  
      def with_mustclose(parser):
          # a utility function to get surrounding bracket
          # with mustclose=True
          return parser.get_surrounding_brackets(mustclose=True)
  
      p = get("3.2")
      self.assertIsNone(with_mustclose(p))
      self.assertIsNone(without_mustclose(p))
  
      p = get("5.6")
      self.assertTupleEqual(without_mustclose(p), ("5.4", "5.25"))
      self.assertTupleEqual(without_mustclose(p), with_mustclose(p))
  
      p = get("5.23")
      self.assertTupleEqual(without_mustclose(p), ("5.21", "5.24"))
      self.assertTupleEqual(without_mustclose(p), with_mustclose(p))
  
      p = get("6.15")
      self.assertTupleEqual(without_mustclose(p), ("6.4", "6.end"))
      self.assertIsNone(with_mustclose(p))
  
      p = get("9.end")
      self.assertIsNone(with_mustclose(p))
      self.assertIsNone(without_mustclose(p))
  
file_path: catboost/contrib/tools/python/src/Lib/idlelib/idle_test/test_hyperparser.py
imports: import unittest
  from test.test_support import requires
  from Tkinter import Tk, Text
  from idlelib.EditorWindow import EditorWindow
  from idlelib.HyperParser import HyperParser
label_desc: Use image node_id 9 for calling the HyperParserTest obj's underlying member method code with example usage: obj.test_get_surrounding_bracket() and returns: parser, parser