code: def test_noctypes_argtype(self):
      import _ctypes_test
      from ctypes import CDLL, c_void_p, ArgumentError
  
      func = CDLL(_ctypes_test.__file__)._testfunc_p_p
      func.restype = c_void_p
      # TypeError: has no from_param method
      self.assertRaises(TypeError, setattr, func, "argtypes", (object,))
  
      class Adapter(object):
          def from_param(cls, obj):
              return None
  
      func.argtypes = (Adapter(),)
      self.assertEqual(func(None), None)
      self.assertEqual(func(object()), None)
  
      class Adapter(object):
          def from_param(cls, obj):
              return obj
  
      func.argtypes = (Adapter(),)
      # don't know how to convert parameter 1
      self.assertRaises(ArgumentError, func, object())
      self.assertEqual(func(c_void_p(42)), 42)
  
      class Adapter(object):
          def from_param(cls, obj):
              raise ValueError(obj)
  
      func.argtypes = (Adapter(),)
      # ArgumentError: argument 1: ValueError: 99
      self.assertRaises(ArgumentError, func, 99)
  
file_path: catboost/contrib/tools/python/src/Lib/ctypes/test/test_parameters.py
imports: import unittest, sys
  from ctypes.test import need_symbol
  import test.support
label_desc: Use image node_id 11 for calling the SimpleTypesTestCase obj's underlying member method code with example usage: obj.test_noctypes_argtype() and returns: None, obj