code: def test_type_shape(self, input_param, input_data, expected_shape):
      for p in TEST_NDARRAYS_ALL:
          input_param_mod = self.convert_data_type(p, input_param)
          input_data_mod = self.convert_data_type(p, input_data)
          cropper = RandCropByPosNegLabeld(**input_param_mod)
          cropper.set_random_state(0)
          result = cropper(input_data_mod)
          self.assertListEqual(
              cropper.cropper.spatial_size, input_param["spatial_size"]
          )
  
          self.assertIsInstance(result, list)
  
          _len = len(tuple(input_data.keys()))
          self.assertTupleEqual(
              tuple(result[0].keys())[:_len], tuple(input_data.keys())
          )
          for k in ("image", "extra", "label"):
              self.assertTupleEqual(result[0][k].shape, expected_shape)
              for i, item in enumerate(result):
                  self.assertEqual(item[k].meta["patch_index"], i)
  
file_path: MONAI/tests/test_rand_crop_by_pos_neg_labeld.py
imports: from __future__ import annotations
  import unittest
  from copy import deepcopy
  import numpy
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import RandCropByPosNegLabeld
  from monai.transforms.lazy.functional import apply_pending
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 2 for calling the TestRandCropByPosNegLabeld obj's underlying member method code with example usage: obj.test_type_shape(input_param, input_data, expected_shape) without return types