code: def test_union_struct(self):
      # nested structures in unions with different byteorders
  
      # create nested structures in unions 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 (
              BigEndianUnion,
              LittleEndianUnion,
              Union,
          ):
  
              class NestedStructure(nested):
                  _fields_ = [("x", c_uint32), ("y", c_uint32)]
  
              class TestUnion(parent):
                  _fields_ = [("point", NestedStructure)]
  
              self.assertEqual(len(data), sizeof(TestUnion))
              ptr = POINTER(TestUnion)
              s = cast(data, ptr)[0]
              del ctypes._pointer_type_cache[TestUnion]
              self.assertEqual(s.point.x, 1)
              self.assertEqual(s.point.y, 2)
  
imports: import binascii
  import ctypes
  import math
  import struct
  import sys
  import unittest
  from ctypes import Structure, Union, LittleEndianUnion, BigEndianUnion, BigEndianStructure, LittleEndianStructure, POINTER, sizeof, cast, c_byte, c_ubyte, c_char, c_wchar, c_void_p, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong, c_uint32, c_float, c_double
label_desc: Use image node_id 14 for calling the Test obj's underlying member method code with example usage: obj.test_union_struct() without return types