code: def hid_device_path_exists(device_path, guid = None):
      
      # expecing HID devices
      if not guid:
          guid = winapi.GetHidGuid()
  
      info_data         = winapi.SP_DEVINFO_DATA()
      info_data.cb_size = sizeof(winapi.SP_DEVINFO_DATA)
  
      with winapi.DeviceInterfaceSetInfo(guid) as h_info:
          for interface_data in winapi.enum_device_interfaces(h_info, guid):
              test_device_path = winapi.get_device_path(h_info,
                      interface_data,
                      byref(info_data))
              if test_device_path == device_path:
                  return True
      # Not any device now with that path
      return False
docs: Test if required device_path is still valid
      (HID device connected to host)