code: def test_struct_fields_1(self):
      if sys.byteorder == "little":
          base = BigEndianStructure
      else:
          base = LittleEndianStructure
  
      class T(base):
          pass
  
      _fields_ = [
          ("a", c_ubyte),
          ("b", c_byte),
          ("c", c_short),
          ("d", c_ushort),
          ("e", c_int),
          ("f", c_uint),
          ("g", c_long),
          ("h", c_ulong),
          ("i", c_longlong),
          ("k", c_ulonglong),
          ("l", c_float),
          ("m", c_double),
          ("n", c_char),
          ("b1", c_byte, 3),
          ("b2", c_byte, 3),
          ("b3", c_byte, 2),
          ("a", c_int * 3 * 3 * 3),
      ]
      T._fields_ = _fields_
  
      # these fields do not support different byte order:
      for typ in c_wchar, c_void_p, POINTER(c_int):
          _fields_.append(("x", typ))
  
          class T(base):
              pass
  
          self.assertRaises(
              TypeError, setattr, T, "_fields_", [("x", typ)]
          )
  
file_path: catboost/contrib/tools/python/src/Lib/ctypes/test/test_byteswap.py
imports: import sys, unittest, struct, math, ctypes
  from binascii import hexlify
  from ctypes import *
label_desc: Use image node_id 8 for calling the Test obj's underlying member method code with example usage: obj.test_struct_fields_1() without return types