code: def test_winerror(self):
      # see Issue 16169
      ERROR_INVALID_PARAMETER = 87
      msg = ctypes.FormatError(ERROR_INVALID_PARAMETER).strip()
      args = (errno.EINVAL, msg, None, ERROR_INVALID_PARAMETER)
  
      e = ctypes.WinError(ERROR_INVALID_PARAMETER)
      self.assertEqual(e.args, args)
      self.assertEqual(e.errno, errno.EINVAL)
      self.assertEqual(e.winerror, ERROR_INVALID_PARAMETER)
  
      kernel32 = ctypes.windll.kernel32
      kernel32.SetLastError(ERROR_INVALID_PARAMETER)
      try:
          raise ctypes.WinError()
      except OSError as exc:
          e = exc
      self.assertEqual(e.args, args)
      self.assertEqual(e.errno, errno.EINVAL)
      self.assertEqual(e.winerror, ERROR_INVALID_PARAMETER)
  
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 1 for calling the TestWinError obj's underlying member method code with example usage: obj.test_winerror() without return types