code: def test_struct_struct(self):
      # nested structures with different byteorders
  
      # create nested structures with given byteorders and set memory to data
  
      for nested, data in (
          (BigEndianStructure, b"\0\0\0\1\0\0\0\2"),
          (LittleEndianStructure, b"\1\0\0\0\2\0\0\0"),
      ):
          for parent in (
              BigEndianStructure,
              LittleEndianStructure,
              Structure,
          ):
  
              class NestedStructure(nested):
                  _fields_ = [("x", c_uint32), ("y", c_uint32)]
  
              class TestStructure(parent):
                  _fields_ = [("point", NestedStructure)]
  
              self.assertEqual(len(data), sizeof(TestStructure))
              ptr = POINTER(TestStructure)
              s = cast(data, ptr)[0]
              del ctypes._pointer_type_cache[TestStructure]
              self.assertEqual(s.point.x, 1)
              self.assertEqual(s.point.y, 2)
  
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 9 for calling the Test obj's underlying member method code with example usage: obj.test_struct_struct() without return types