code: def check_pyobject_is_freed(self, func_name):
      code = textwrap.dedent(
          f"""
              import gc, os, sys, _testinternalcapi
              # Disable the GC to avoid crash on GC collection
              gc.disable()
              _testinternalcapi.{func_name}()
              # Exit immediately to avoid a crash while deallocating
              # the invalid object
              os._exit(0)
          """
      )
      assert_python_ok(
          "-c",
          code,
          PYTHONMALLOC=self.PYTHONMALLOC,
          MALLOC_CONF="junk:false",
      )
  
imports: import re
  import textwrap
  import unittest
  from test import support
  from test.support import import_helper, requires_subprocess
  from test.support.script_helper import assert_python_failure, assert_python_ok
label_desc: Use image node_id 7 for calling the PyMemDebugTests obj's underlying member method code with example usage: obj.check_pyobject_is_freed(func_name) without return types