code: def test_gradcheck(self, device, dtype):
      tensor = torch.rand(
          2,
          3,
          4,
          4,
          requires_grad=True,
          device=device,
          dtype=torch.float64,
      )
      kernel = torch.rand(
          3, 3, requires_grad=True, device=device, dtype=torch.float64
      )
      assert gradcheck(
          closing,
          (tensor, kernel),
          raise_exception=True,
          fast_mode=True,
      )
  
file_path: kornia/test/morphology/test_closing.py
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  from kornia.morphology import closing
  from kornia.testing import assert_close
label_desc: Use image node_id 6 for calling the TestClosing obj's underlying member method code with example usage: obj.test_gradcheck(device, dtype) without return types