docstr: Run gdb and have cygdb import the debug information from the code
  defined in TestParseTreeTransforms's setUp method
docstr_tok: ["Run","gdb","and","have","cygdb","import","the","debug","information","from","the","code","defined","in","TestParseTreeTransforms","'s","setUp","method"]
code: def setUp(self):
      """
      Run gdb and have cygdb import the debug information from the code
      defined in TestParseTreeTransforms's setUp method
      """
      if not test_gdb():
          return
  
      self.tempdir = tempfile.mkdtemp()
      self.destfile = os.path.join(self.tempdir, "codefile.pyx")
      self.debug_dest = os.path.join(
          self.tempdir, "cython_debug", "cython_debug_info_codefile"
      )
      self.cfuncs_destfile = os.path.join(self.tempdir, "cfuncs")
  
      self.cwd = os.getcwd()
      try:
          os.chdir(self.tempdir)
  
          shutil.copy(codefile, self.destfile)
          shutil.copy(cfuncs_file, self.cfuncs_destfile + ".c")
          shutil.copy(
              cfuncs_file.replace(".c", ".h"),
              self.cfuncs_destfile + ".h",
          )
  
          compiler = ccompiler.new_compiler()
          compiler.compile(
              ["cfuncs.c"], debug=True, extra_postargs=["-fPIC"]
          )
  
          opts = dict(
              test_directory=self.tempdir,
              module="codefile",
          )
  
          optimization_disabler = build_ext.Optimization()
  
          cython_compile_testcase = runtests.CythonCompileTestCase(
              workdir=self.tempdir,
              # we clean up everything (not only compiled files)
              cleanup_workdir=False,
              tags=runtests.parse_tags(codefile),
              **opts,
          )
  
          new_stderr = open(os.devnull, "w")
  
          stderr = sys.stderr
          sys.stderr = new_stderr
  
          optimization_disabler.disable_optimization()
          try:
              cython_compile_testcase.run_cython(
                  targetdir=self.tempdir,
                  incdir=None,
                  annotate=False,
                  extra_compile_options={
                      "gdb_debug": True,
                      "output_dir": self.tempdir,
                  },
                  **opts,
              )
  
              cython_compile_testcase.run_distutils(
                  incdir=None,
                  workdir=self.tempdir,
                  extra_extension_args={"extra_objects": ["cfuncs.o"]},
                  **opts,
              )
          finally:
              optimization_disabler.restore_state()
              sys.stderr = stderr
              new_stderr.close()
  
          # ext = Cython.Distutils.extension.Extension(
          # 'codefile',
          # ['codefile.pyx'],
          # cython_gdb=True,
          # extra_objects=['cfuncs.o'])
          #
          # distutils.core.setup(
          # script_args=['build_ext', '--inplace'],
          # ext_modules=[ext],
          # cmdclass=dict(build_ext=Cython.Distutils.build_ext)
          # )
  
      except:
          os.chdir(self.cwd)
          raise
  
imports: import os
  import re
  import sys
  import shutil
  import warnings
  import textwrap
  import unittest
  import tempfile
  import subprocess
  from distutils import ccompiler
  import runtests
  import Cython.Distutils.extension
  import Cython.Distutils.old_build_ext
  from Cython.Debugger import Cygdb
label_desc: Use image node_id 1 for calling the DebuggerTestCase obj's underlying member method code with example usage: obj.setUp() without return types