code: def test_exception(self, device):
      with pytest.raises(RuntimeError) as e:
          OnnxLightGlue(device="invalid device")
      assert "Invalid device string: 'invalid device'" in str(e)
  
      with pytest.raises(Exception) as e:
          OnnxLightGlue("disk_fp16", "cpu")
      assert "FP16 requires CUDA." in str(e)
  
      model = OnnxLightGlue(device=device)
  
      kpts = torch.zeros(1, 5, 2, device=device)
      desc = torch.zeros(1, 5, 128, device=device)
      image = torch.zeros(1, 3, 10, 10)
  
      # Missing input
      with pytest.raises(Exception) as e:
          model(
              {
                  "image0": {
                      "keypoints": kpts,
                      "descriptors": desc,
                      "image": image,
                  }
              }
          )
      assert "Missing key image1 in data" in str(e)
  
      # Wrong dtype
      with pytest.raises(Exception) as e:
          model(
              {
                  "image0": {
                      "keypoints": torch.zeros(
                          1, 5, 2, dtype=torch.int32, device=device
                      ),
                      "descriptors": desc,
                      "image": image,
                  },
                  "image1": {
                      "keypoints": kpts,
                      "descriptors": desc,
                      "image": image,
                  },
              }
          )
      assert "Wrong dtype" in str(e)
  
      # Wrong device
      wrong_device = torch.device(
          "cpu" if device.type == "cuda" else "cuda"
      )
      with pytest.raises(Exception) as e:
          model(
              {
                  "image0": {
                      "keypoints": torch.zeros(
                          1, 5, 2, device=wrong_device
                      ),
                      "descriptors": desc,
                      "image": image,
                  },
                  "image1": {
                      "keypoints": kpts,
                      "descriptors": desc,
                      "image": image,
                  },
              }
          )
      assert "Wrong device" in str(e)
  
      # Wrong shapes
      with pytest.raises(Exception) as e:
          model(
              {
                  "image0": {
                      "keypoints": torch.zeros(1, 4, 2, device=device),
                      "descriptors": desc,
                      "image": image,
                  },
                  "image1": {
                      "keypoints": kpts,
                      "descriptors": desc,
                      "image": image,
                  },
              }
          )
      assert (
          "Number of keypoints does not match number of descriptors"
          in str(e)
      )
  
      with pytest.raises(Exception) as e:
          model(
              {
                  "image0": {
                      "keypoints": kpts,
                      "descriptors": torch.zeros(
                          1, 5, 127, device=device
                      ),
                      "image": image,
                  },
                  "image1": {
                      "keypoints": kpts,
                      "descriptors": desc,
                      "image": image,
                  },
              }
          )
      assert "Descriptors' dimensions do not match" in str(e)
  
file_path: kornia/test/feature/test_lightglue_onnx.py
imports: import pytest
  import torch
  from kornia.feature import OnnxLightGlue
  from kornia.feature.lightglue_onnx.utils import normalize_keypoints
label_desc: Use image node_id 5 for calling the TestOnnxLightGlue obj's underlying member method code with example usage: obj.test_exception(device) without return types