code: def test_grid_patch_meta(
      self, input_parameters, image, expected, expected_meta
  ):
      set_track_meta(True)
      splitter = GridPatch(**input_parameters)
      output = splitter(image)
      self.assertEqual(len(output), len(expected))
      if "path" in expected_meta[0]:
          self.assertTrue(
              output.meta["path"] == expected_meta[0]["path"]
          )
      for output_patch, expected_patch, expected_patch_meta in zip(
          output, expected, expected_meta
      ):
          assert_allclose(output_patch, expected_patch, type_test=False)
          self.assertTrue(isinstance(output_patch, MetaTensor))
          self.assertTrue(
              output_patch.meta["location"]
              == expected_patch_meta["location"]
          )
          self.assertTrue(
              output_patch.meta["spatial_shape"],
              list(output_patch.shape[1:]),
          )
          if "path" in expected_meta[0]:
              self.assertTrue(
                  output_patch.meta["path"]
                  == expected_patch_meta["path"]
              )
  
file_path: MONAI/tests/test_grid_patch.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.spatial.array import GridPatch
  from tests.utils import TEST_NDARRAYS, SkipIfBeforePyTorchVersion, assert_allclose
label_desc: Use image node_id 2 for calling the TestGridPatch obj's underlying member method code with example usage: obj.test_grid_patch_meta(input_parameters, image, expected, expected_meta) without return types