code: def test_COMError(self):
      from _ctypes import COMError
  
      if support.HAVE_DOCSTRINGS:
          self.assertEqual(
              COMError.__doc__, "Raised when a COM method call failed."
          )
  
      ex = COMError(-1, "text", ("details",))
      self.assertEqual(ex.hresult, -1)
      self.assertEqual(ex.text, "text")
      self.assertEqual(ex.details, ("details",))
  
      self.assertEqual(
          COMError.mro(), [COMError, Exception, BaseException, object]
      )
      self.assertFalse(
          COMError.__flags__ & Py_TPFLAGS_DISALLOW_INSTANTIATION
      )
      self.assertTrue(COMError.__flags__ & Py_TPFLAGS_IMMUTABLETYPE)
  
imports: import _ctypes_test
  import ctypes
  import errno
  import sys
  import unittest
  from ctypes import CDLL, Structure, POINTER, pointer, sizeof, byref, _pointer_type_cache, c_void_p, c_char, c_int, c_long
  from test import support
  from ._support import Py_TPFLAGS_DISALLOW_INSTANTIATION, Py_TPFLAGS_IMMUTABLETYPE
label_desc: Use image node_id 3 for calling the TestWintypes obj's underlying member method code with example usage: obj.test_COMError() without return types