code: def test_patch_merging(self):
      dim = 10
      t = PatchMerging(dim)(torch.zeros((1, 21, 20, 20, dim)))
      self.assertEqual(t.shape, torch.Size([1, 11, 10, 10, 20]))
  
file_path: MONAI/tests/test_swin_unetr.py
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  from unittest import skipUnless
  import torch
  from parameterized import parameterized
  from monai.apps import download_url
  from monai.networks import eval_mode
  from monai.networks.nets.swin_unetr import PatchMerging, PatchMergingV2, SwinUNETR, filter_swinunetr
  from monai.networks.utils import copy_model_state
  from monai.utils import optional_import
  from tests.utils import assert_allclose, pytorch_after, skip_if_downloading_fails, skip_if_no_cuda, skip_if_quick, testing_data_config
label_desc: Use image node_id 3 for calling the TestSWINUNETR obj's underlying member method code with example usage: obj.test_patch_merging() without return types