code: def test_endian_types(self):
      for tp, fmt, shape, itemtp in endian_types:
          ob = tp()
          v = memoryview(ob)
          try:
              self.assertEqual(v.format, fmt)
              if shape is not None:
                  self.assertEqual(len(v), shape[0])
              else:
                  self.assertEqual(len(v) * sizeof(itemtp), sizeof(ob))
              self.assertEqual(v.itemsize, sizeof(itemtp))
              self.assertEqual(v.shape, shape)
              # ctypes object always have a non-strided memory block
              self.assertEqual(v.strides, None)
              # they are always read/write
              self.assertFalse(v.readonly)
  
              if v.shape:
                  n = 1
                  for dim in v.shape:
                      n = n * dim
                  self.assertEqual(n, len(v))
          except:
              # so that we can see the failing type
              print(tp)
              raise
  
imports: import unittest
  from ctypes import *
  import re, sys
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_endian_types() without return types