def METHOD_NAME(self, input_param, input_data, _expected_type, _expected_shape):
    cropper = RandCropByLabelClassesd(**input_param)
    # non-lazy
    cropper.set_random_state(0)
    expected = cropper(input_data)
    self.assertIsInstance(expected[0]["img"], MetaTensor)
    # lazy
    cropper.set_random_state(0)
    cropper.lazy = True
    pending_result = cropper(input_data)
    for i, _pending_result in enumerate(pending_result):
        self.assertIsInstance(_pending_result["img"], MetaTensor)
        assert_allclose(_pending_result["img"].peek_pending_affine(), expected[i]["img"].affine)
        assert_allclose(_pending_result["img"].peek_pending_shape(), expected[i]["img"].shape[1:])
        # only support nearest
        result = apply_pending(_pending_result["img"], overrides={"mode": "nearest", "align_corners": False})[0]
        # compare
        assert_allclose(result, expected[i]["img"], rtol=1e-5)