code: def test_type_shape(
      self, input_param, input_data, expected_type, expected_shape
  ):
      result = RandCropByLabelClassesd(**input_param)(input_data)
      self.assertIsInstance(result, expected_type)
      self.assertTupleEqual(result[0]["img"].shape, expected_shape)
      # test with pre-computed indices
      input_data = ClassesToIndicesd(
          keys="label", num_classes=input_param["num_classes"]
      )(input_data)
      input_param["indices_key"] = "label_cls_indices"
      result = RandCropByLabelClassesd(**input_param)(input_data)
      self.assertIsInstance(result, expected_type)
      self.assertTupleEqual(result[0]["img"].shape, expected_shape)
      _len = (
          len(tuple(input_data.keys())) - 1
      )  # except for the indices_key
      self.assertTupleEqual(
          tuple(result[0].keys())[:_len], tuple(input_data.keys())[:-1]
      )
  
file_path: MONAI/tests/test_rand_crop_by_label_classesd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import ClassesToIndicesd, RandCropByLabelClassesd
  from monai.transforms.lazy.functional import apply_pending
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 1 for calling the TestRandCropByLabelClassesd obj's underlying member method code with example usage: obj.test_type_shape(input_param, input_data, expected_type, expected_shape) without return types