code: def test_pending_ops(
      self, zoom, mode, align_corners=False, keep_size=False
  ):
      im = MetaTensor(
          self.imt[0], meta={"a": "b", "affine": DEFAULT_TEST_AFFINE}
      )
      zoom_fn = Zoom(
          zoom=zoom,
          mode="bilinear",
          keep_size=keep_size,
          dtype=torch.float64,
          align_corners=align_corners,
      )
      # non-lazy
      expected = zoom_fn(im)
      self.assertIsInstance(expected, MetaTensor)
      # lazy
      zoom_fn.lazy = True
      pending_result = zoom_fn(im)
      self.assertIsInstance(pending_result, MetaTensor)
      assert_allclose(
          pending_result.peek_pending_affine(), expected.affine
      )
      assert_allclose(
          pending_result.peek_pending_shape(), expected.shape[1:]
      )
      overrides = {
          "mode": "bilinear",
          "dtype": np.float64,
          "align_corners": align_corners,
      }
      result = apply_pending(pending_result, overrides=overrides)[0]
      # compare
      match_ratio = np.sum(np.isclose(result, expected)) / np.prod(
          result.shape
      )
      self.assertGreater(match_ratio, 0.95)
  
file_path: MONAI/tests/test_zoom.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from scipy.ndimage import zoom
  from monai.data import MetaTensor, set_track_meta
  from monai.transforms import Zoom
  from monai.transforms.lazy.functional import apply_pending
  from tests.utils import DEFAULT_TEST_AFFINE, TEST_NDARRAYS_ALL, NumpyImageTestCase2D, assert_allclose, test_local_inversion
label_desc: Use image node_id 1 for calling the TestZoom obj's underlying member method code with example usage: obj.test_pending_ops(zoom, mode, align_corners, keep_size) without return types