code: def test_subclass_delayed(self):
      class X(Structure):
          pass
  
      self.assertEqual(sizeof(X), 0)
      X._fields_ = [("a", c_int)]
  
      class Y(X):
          pass
  
      self.assertEqual(sizeof(Y), sizeof(X))
      Y._fields_ = [("b", c_int)]
  
      class Z(X):
          pass
  
      self.assertEqual(sizeof(X), sizeof(c_int))
      self.assertEqual(sizeof(Y), sizeof(c_int) * 2)
      self.assertEqual(sizeof(Z), sizeof(c_int))
      self.assertEqual(X._fields_, [("a", c_int)])
      self.assertEqual(Y._fields_, [("b", c_int)])
      self.assertEqual(Z._fields_, [("a", c_int)])
  
imports: import _ctypes_test
  from platform import architecture
  import struct
  import sys
  import unittest
  from ctypes import CDLL, Array, Structure, Union, POINTER, sizeof, byref, alignment, c_void_p, c_char, c_wchar, c_byte, c_ubyte, c_uint8, c_uint16, c_uint32, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong, c_float, c_double
  from ctypes.util import find_library
  from struct import calcsize
  from collections import namedtuple
  from test import support
  from ._support import _CData, PyCStructType, Py_TPFLAGS_DISALLOW_INSTANTIATION, Py_TPFLAGS_IMMUTABLETYPE
label_desc: Use image node_id 2 for calling the SubclassesTest obj's underlying member method code with example usage: obj.test_subclass_delayed() without return types