docstr: Test input is very close to output when deformation is very low, verifies there's no transposition.
docstr_tok: ["Test","input","is","very","close","to","output","when","deformation","is","very","low",",","verifies","there","'s","no","transposition","."]
code: def test_rand_smooth_nodeformd(self):
      """Test input is very close to output when deformation is very low, verifies there's no transposition."""
  
      for label, im in zip(("2D", "3D"), (pattern2d, pattern3d)):
          with self.subTest(
              f"Testing {label} case with shape {im.shape}"
          ):
              rsize = (3,) * len(im.shape)
              g = RandSmoothDeformd(
                  keys=(KEY,),
                  spatial_size=im.shape,
                  rand_size=rsize,
                  prob=1.0,
                  device=device,
                  def_range=1e-20,
              )
              g.set_random_state(123)
  
              expected_val = {KEY: im[None]}
  
              res = g(expected_val)
              for key, result in res.items():
                  expected = expected_val[key]
  
                  self.assertSequenceEqual(
                      tuple(result.shape), tuple(expected.shape)
                  )
  
                  assert_allclose(
                      result,
                      expected,
                      rtol=_rtol,
                      atol=1e-1,
                      type_test="tensor",
                  )
  
file_path: MONAI/tests/test_smooth_field.py
imports: from __future__ import annotations
  import unittest
  from itertools import product
  import numpy
  import torch
  from parameterized import parameterized
  from monai.networks.utils import meshgrid_xy
  from monai.transforms import RandSmoothDeformd, RandSmoothFieldAdjustContrastd, RandSmoothFieldAdjustIntensityd
  from tests.utils import TEST_NDARRAYS, assert_allclose, is_tf32_env
label_desc: Use image node_id 6 for calling the TestSmoothField obj's underlying member method code with example usage: obj.test_rand_smooth_nodeformd() without return types