code: def test_metatensor_values(self):
      device = (
          torch.device("cuda:0")
          if torch.cuda.is_available()
          else torch.device("cpu:0")
      )
      input_data = {
          "img1": MetaTensor([[0, 1], [1, 2]], device=device),
          "img2": MetaTensor([[0, 1], [1, 2]], device=device),
      }
      result = ConcatItemsd(keys=["img1", "img2"], name="cat_img")(
          input_data
      )
      self.assertTrue("cat_img" in result)
      self.assertTrue(isinstance(result["cat_img"], MetaTensor))
      self.assertEqual(result["img1"].meta, result["cat_img"].meta)
      result["cat_img"] += 1
      assert_allclose(
          result["img1"], torch.tensor([[0, 1], [1, 2]], device=device)
      )
      assert_allclose(
          result["cat_img"],
          torch.tensor([[1, 2], [2, 3], [1, 2], [2, 3]], device=device),
      )
  
file_path: MONAI/tests/test_concat_itemsd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from monai.data import MetaTensor
  from monai.transforms import ConcatItemsd
  from tests.utils import assert_allclose
label_desc: Use image node_id 2 for calling the TestConcatItemsd obj's underlying member method code with example usage: obj.test_metatensor_values() without return types