code: def test_exception_3d(self):
      with pytest.raises(ValueError) as errinf:
          kornia.losses.HausdorffERLoss3D()(
              (torch.rand(1, 2, 1) > 0.5) * 1,
              (torch.rand(1, 1, 1, 2) > 0.5) * 1,
          )
      assert "Only 3D images supported. Got " in str(errinf)
  
      with pytest.raises(ValueError) as errinf:
          kornia.losses.HausdorffERLoss3D()(
              (torch.rand(1, 2, 1, 1, 1) > 0.5) * 1,
              torch.tensor([[[[[5]]]]], dtype=torch.float32),
          )
      assert "Invalid target value" in str(errinf)
  
file_path: kornia/test/losses/test_hd.py
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import assert_close
label_desc: Use image node_id 3 for calling the TestHausdorffLoss obj's underlying member method code with example usage: obj.test_exception_3d() without return types