code: def test_affine_grid(self, input_param, input_data, expected_val):
      g = AffineGrid(**input_param)
      set_track_meta(False)
      result, _ = g(**input_data)
      self.assertNotIsInstance(result, MetaTensor)
      self.assertIsInstance(result, torch.Tensor)
      set_track_meta(True)
      if "device" in input_data:
          self.assertEqual(result.device, input_data[device])
      assert_allclose(result, expected_val, type_test=False, rtol=_rtol)
  
file_path: MONAI/tests/test_affine_grid.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.data import MetaTensor, set_track_meta
  from monai.transforms import AffineGrid
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose, is_tf32_env
label_desc: Use image node_id 1 for calling the TestAffineGrid obj's underlying member method code with example usage: obj.test_affine_grid(input_param, input_data, expected_val) without return types