code: def _is_pid_running_on_windows(pid):
      
      import ctypes.wintypes
  
      kernel32 = ctypes.windll.kernel32
      handle = kernel32.OpenProcess(1, 0, pid)
      if handle == 0:
          return False
      exit_code = ctypes.wintypes.DWORD()
      ret = kernel32.GetExitCodeProcess(handle, ctypes.byref(exit_code))
      is_alive = (ret == 0 or exit_code.value == _STILL_ALIVE)  # pylint: disable=undefined-variable
      kernel32.CloseHandle(handle)
      return is_alive
docs: Check if PID is running for Windows systems