code: def test_with_statement_many_context_managers(self):
      # See gh-113297
  
      def get_code(n):
          code = textwrap.dedent(
              """
                  def bug():
                      with (
                      a
                  """
          )
          for i in range(n):
              code += f"    as a{i}, a\n"
          code += "): yield a"
          return code
  
      CO_MAXBLOCKS = 20  # static nesting limit of the compiler
  
      for n in range(CO_MAXBLOCKS):
          with self.subTest(f"within range: {n=}"):
              compile(get_code(n), "<string>", "exec")
  
      for n in range(CO_MAXBLOCKS, CO_MAXBLOCKS + 5):
          with self.subTest(f"out of range: {n=}"):
              self._check_error(
                  get_code(n), "too many statically nested blocks"
              )
  
imports: import re
  import doctest
  import textwrap
  import unittest
  from test import support
label_desc: Use image node_id 25 for calling the SyntaxTestCase obj's underlying member method code with example usage: obj.test_with_statement_many_context_managers() and returns: code