code: def build_extension(self, grammar_source):
      grammar = parse_string(grammar_source, GrammarParser)
      # Because setUp() already changes the current directory to the
      # temporary path, use a relative path here to prevent excessive
      # path lengths when compiling.
      generate_parser_c_extension(
          grammar, Path("."), library_dir=self.library_dir
      )
  
imports: import contextlib
  import subprocess
  import sysconfig
  import textwrap
  import unittest
  import os
  import shutil
  import tempfile
  from pathlib import Path
  from test import test_tools
  from test import support
  from test.support import os_helper, import_helper
  from test.support.script_helper import assert_python_ok
label_desc: Use image node_id 4 for calling the TestCParser obj's underlying member method code with example usage: obj.build_extension(grammar_source) without return types