code: def test_shape(self, input_shape, expected):
      test_data = np.random.randint(0, 8, size=input_shape)
      test_data = test_data == 7
      for p in TEST_NDARRAYS:
          result = BoundingRectD("image")({"image": p(test_data)})
          np.testing.assert_allclose(result["image_bbox"], expected)
  
          result = BoundingRectD("image", "cc")({"image": p(test_data)})
          np.testing.assert_allclose(result["image_cc"], expected)
  
          with self.assertRaises(KeyError):
              BoundingRectD("image", "cc")(
                  {"image": p(test_data), "image_cc": None}
              )
  
file_path: MONAI/tests/test_bounding_rectd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  import monai
  from monai.transforms import BoundingRectD
  from tests.utils import TEST_NDARRAYS
label_desc: Use image node_id 3 for calling the TestBoundingRectD obj's underlying member method code with example usage: obj.test_shape(input_shape, expected) without return types