code: def test_callbacks(self):
      f = dll._testfunc_callback_i_if
      f.restype = c_int
      f.argtypes = None
  
      MyCallback = CFUNCTYPE(c_int, c_int)
  
      def callback(value):
          return value
  
      cb = MyCallback(callback)
  
      result = f(self.wrap(-10), self.wrap(cb))
      self.assertEqual(result, -18)
  
      # test with prototype
      f.argtypes = [c_int, MyCallback]
      cb = MyCallback(callback)
  
      result = f(self.wrap(-10), self.wrap(cb))
      self.assertEqual(result, -18)
  
      result = f(self.wrap(-10), self.wrap(cb))
      self.assertEqual(result, -18)
  
      AnotherCallback = CALLBACK_FUNCTYPE(
          c_int, c_int, c_int, c_int, c_int
      )
  
      # check that the prototype works: we call f with wrong
      # argument types
      cb = AnotherCallback(callback)
      self.assertRaises(ArgumentError, f, self.wrap(-10), self.wrap(cb))
  
imports: import _ctypes_test
  import ctypes
  import unittest
  from ctypes import Structure, CDLL, CFUNCTYPE, POINTER, pointer, byref, c_short, c_int, c_long, c_longlong, c_byte, c_wchar, c_float, c_double, ArgumentError
label_desc: Use image node_id 5 for calling the BasicWrapTestCase obj's underlying member method code with example usage: obj.test_callbacks() and returns: value