code: def test_rand_affine_grid(
      self, input_param, input_data, expected_val
  ):
      g = RandAffineGrid(**input_param)
      g.set_random_state(123)
      result = g(**input_data)
      if "device" in input_data:
          self.assertEqual(result.device, input_data[device])
      assert_allclose(
          result, expected_val, type_test=False, rtol=_rtol, atol=1e-4
      )
  
file_path: MONAI/tests/test_rand_affine_grid.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.transforms import RandAffineGrid
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose, is_tf32_env
label_desc: Use image node_id 1 for calling the TestRandAffineGrid obj's underlying member method code with example usage: obj.test_rand_affine_grid(input_param, input_data, expected_val) without return types