code: def test_2d(self):
      a = torch.ones(1, 1, 3, 3)
      g = GaussianFilter(2, 3, 3).to(torch.device("cpu:0"))
      expected = np.array(
          [
              [
                  [
                      [0.13239081, 0.13932934, 0.13239081],
                      [0.13932936, 0.14663152, 0.13932936],
                      [0.13239081, 0.13932934, 0.13239081],
                  ]
              ]
          ]
      )
  
      np.testing.assert_allclose(
          g(a).cpu().numpy(), expected, rtol=1e-5
      )
      if torch.cuda.is_available():
          g = GaussianFilter(2, 3, 3).to(torch.device("cuda:0"))
          np.testing.assert_allclose(
              g(a.cuda()).cpu().numpy(), expected, rtol=1e-2
          )
  
file_path: MONAI/tests/test_gaussian_filter.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.networks.layers import GaussianFilter
  from tests.utils import skip_if_quick
label_desc: Use image node_id 2 for calling the GaussianFilterTestCase obj's underlying member method code with example usage: obj.test_2d() without return types