code: def test_statically_nested_blocks():
      def build(code, depth):
          if depth == 0:
              return code
  
          new_code = "if 1:\n" + indent(code)
          return build(new_code, depth - 1)
  
      def get_error(depth, add_func=False):
          code = build("foo", depth)
          if add_func:
              code = "def bar():\n" + indent(code)
          errors = _get_error_list(code)
          if errors:
              assert (
                  errors[0].message
                  == "SyntaxError: too many statically nested blocks"
              )
              return errors[0]
          return None
  
      assert get_error(19) is None
      assert get_error(19, add_func=True) is None
  
      assert get_error(20)
      assert get_error(20, add_func=True)
  
imports: import sys
  import warnings
  import pytest
  import parso
  from textwrap import dedent
  from parso._compatibility import is_pypy
  from .failing_examples import FAILING_EXAMPLES, indent, build_nested
label_desc: Use image node_id 9 for calling a global function with example usage: test_statically_nested_blocks() and returns: build, None, code, errors