code: def test_saved_content(
      self, test_data, meta_data, output_ext, resample
  ):
      if meta_data is not None:
          test_data = MetaTensor(test_data, meta=meta_data)
  
      with tempfile.TemporaryDirectory() as tempdir:
          trans = SaveImage(
              output_dir=tempdir,
              output_ext=output_ext,
              resample=resample,
              separate_folder=False,  # test saving into the same folder
              output_name_formatter=lambda x, xform: dict(
                  subject=x["filename_or_obj"] if x else "0"
              ),
          )
          trans(test_data)
  
          filepath = "testfile0" if meta_data is not None else "0"
          self.assertTrue(
              os.path.exists(
                  os.path.join(
                      tempdir, filepath + "_trans" + output_ext
                  )
              )
          )
  
file_path: MONAI/tests/test_save_image.py
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  import torch
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import SaveImage
  from monai.utils import optional_import
label_desc: Use image node_id 1 for calling the TestSaveImage obj's underlying member method code with example usage: obj.test_saved_content(test_data, meta_data, output_ext, resample) without return types