code: def test_3d(self):
      a = torch.tensor(
          [
              [list(range(7)), list(range(7)), list(range(7))],
              [list(range(7)), list(range(7)), list(range(7))],
          ],
          dtype=torch.float,
      )
      a = a[None][None]
      a = a.expand(2, 3, -1, -1, -1)
      expected = np.array(
          [
              [
                  [4.0, 12.0, 24.0, 36.0, 48.0, 60.0, 44.0],
                  [6.0, 18.0, 36.0, 54.0, 72.0, 90.0, 66.0],
                  [4.0, 12.0, 24.0, 36.0, 48.0, 60.0, 44.0],
              ],
              [
                  [4.0, 12.0, 24.0, 36.0, 48.0, 60.0, 44.0],
                  [6.0, 18.0, 36.0, 54.0, 72.0, 90.0, 66.0],
                  [4.0, 12.0, 24.0, 36.0, 48.0, 60.0, 44.0],
              ],
          ]
      )
      # testing shapes
      k = torch.tensor([1, 1, 1])
      for kernel in (k, [k] * 3):
          out = separable_filtering(a, kernel)
          np.testing.assert_allclose(
              out.cpu().numpy()[1][2], expected, rtol=1e-4
          )
          if torch.cuda.is_available():
              out = separable_filtering(
                  a.cuda(),
                  kernel.cuda()
                  if isinstance(kernel, torch.Tensor)
                  else [k.cuda() for k in kernel],
              )
              np.testing.assert_allclose(
                  out.cpu().numpy()[0][1], expected, rtol=1e-4
              )
  
file_path: MONAI/tests/test_separable_filter.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from monai.networks.layers import separable_filtering
label_desc: Use image node_id 3 for calling the SeparableFilterTestCase obj's underlying member method code with example usage: obj.test_3d() without return types