code: def test_gradcheck(self, device, dtype):
      img = torch.arange(0.0, 64.0, device=device, dtype=dtype).view(
          1, 1, 4, 4, 4
      )
      img = utils.tensor_to_gradcheck_var(img)  # to var
  
      boxes = torch.tensor(
          [
              [
                  [0, 0, 1],
                  [3, 0, 1],
                  [3, 2, 1],
                  [0, 2, 1],
                  [0, 0, 3],
                  [3, 0, 3],
                  [3, 2, 3],
                  [0, 2, 3],
              ]
          ],
          device=device,
          dtype=dtype,
      )  # 1x8x3
      boxes = utils.tensor_to_gradcheck_var(
          boxes, requires_grad=False
      )  # to var
  
      assert gradcheck(
          kornia.geometry.transform.crop_and_resize3d,
          (img, boxes, (4, 3, 2)),
          raise_exception=True,
          fast_mode=True,
      )
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import assert_close
  from kornia.utils._compat import torch_version
label_desc: Use image node_id 3 for calling the TestCropAndResize3D obj's underlying member method code with example usage: obj.test_gradcheck(device, dtype) without return types