code: def setUpClass(cls):
      if cls._has_run:
          # Since gh-104798 (Use setuptools in peg-generator and reenable
          # tests), this test case has been producing ref leaks. Initial
          # debugging points to bug(s) in setuptools and/or importlib.
          # See gh-105063 for more info.
          raise unittest.SkipTest(
              "gh-105063: can not rerun because of ref. leaks"
          )
      cls._has_run = True
  
      # When running under regtest, a separate tempdir is used
      # as the current directory and watched for left-overs.
      # Reusing that as the base for temporary directories
      # ensures everything is cleaned up properly and
      # cleans up afterwards if not (with warnings).
      cls.tmp_base = os.getcwd()
      if os.path.samefile(cls.tmp_base, os_helper.SAVEDCWD):
          cls.tmp_base = None
      # Create a directory for the reuseable static library part of
      # the pegen extension build process.  This greatly reduces the
      # runtime overhead of spawning compiler processes.
      cls.library_dir = tempfile.mkdtemp(dir=cls.tmp_base)
      cls.addClassCleanup(shutil.rmtree, cls.library_dir)
  
      with contextlib.ExitStack() as stack:
          python_exe = stack.enter_context(
              support.setup_venv_with_pip_setuptools_wheel("venv")
          )
          sitepackages = subprocess.check_output(
              [
                  python_exe,
                  "-c",
                  "import sysconfig; print(sysconfig.get_path('platlib'))",
              ],
              text=True,
          ).strip()
          stack.enter_context(import_helper.DirsOnSysPath(sitepackages))
          cls.addClassCleanup(stack.pop_all().close)
  
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 1 for calling the TestCParser obj's underlying member method code with example usage: obj.setUpClass(cls) without return types