code: def test_GetLastError(self):
      dll = ctypes.WinDLL("kernel32", use_last_error=True)
      GetModuleHandle = dll.GetModuleHandleA
      GetModuleHandle.argtypes = [c_wchar_p]
  
      self.assertEqual(0, GetModuleHandle("foo"))
      self.assertEqual(ctypes.get_last_error(), 126)
  
      self.assertEqual(ctypes.set_last_error(32), 126)
      self.assertEqual(ctypes.get_last_error(), 32)
  
      def _worker():
          ctypes.set_last_error(0)
  
          dll = ctypes.WinDLL("kernel32", use_last_error=False)
          GetModuleHandle = dll.GetModuleHandleW
          GetModuleHandle.argtypes = [c_wchar_p]
          GetModuleHandle("bar")
  
          self.assertEqual(ctypes.get_last_error(), 0)
  
      t = threading.Thread(target=_worker)
      t.start()
      t.join()
  
      self.assertEqual(ctypes.get_last_error(), 32)
  
      ctypes.set_last_error(0)
  
file_path: cpython/Lib/test/test_ctypes/test_errno.py
imports: import ctypes
  import errno
  import os
  import threading
  import unittest
  from ctypes import CDLL, c_int, c_char_p, c_wchar_p, get_errno, set_errno
  from ctypes.util import find_library
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_GetLastError() without return types