code: def test_kernel(self, device, dtype):
      tensor = torch.tensor(
          [[0.5, 1.0, 0.3], [0.7, 0.3, 0.8], [0.4, 0.9, 0.2]],
          device=device,
          dtype=dtype,
      )[None, None, :, :]
      kernel = torch.tensor(
          [[0.0, 1.0, 0.0], [1.0, 1.0, 1.0], [0.0, 1.0, 0.0]],
          device=device,
          dtype=dtype,
      )
      expected = torch.tensor(
          [[0.2, 0.0, 0.5], [0.0, 0.4, 0.0], [0.3, 0.0, 0.6]],
          device=device,
          dtype=dtype,
      )[None, None, :, :]
      assert_close(
          bottom_hat(tensor, kernel), expected, atol=1e-3, rtol=1e-3
      )
  
file_path: kornia/test/morphology/test_bottom_hat.py
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  from kornia.morphology import bottom_hat
  from kornia.testing import assert_close
label_desc: Use image node_id 3 for calling the TestBottomHat obj's underlying member method code with example usage: obj.test_kernel(device, dtype) without return types