code: def test_struct_cleans_up_at_runtime_shutdown(self):
      code = """if 1:
              import struct
  
              class C:
                  def __init__(self):
                      self.pack = struct.pack
                  def __del__(self):
                      self.pack('I', -42)
  
              struct.x = C()
              """
      rc, stdout, stderr = assert_python_ok("-c", code)
      self.assertEqual(rc, 0)
      self.assertEqual(stdout.rstrip(), b"")
      self.assertIn(b"Exception ignored in:", stderr)
      self.assertIn(b"C.__del__", stderr)
  
imports: from collections import abc
  import array
  import gc
  import math
  import operator
  import unittest
  import struct
  import sys
  import weakref
  from test import support
  from test.support import import_helper
  from test.support.script_helper import assert_python_ok
label_desc: Use image node_id 26 for calling the StructTest obj's underlying member method code with example usage: obj.test_struct_cleans_up_at_runtime_shutdown() without return types