code: def test_rand_weighted_cropd(
      self, _, init_params, input_data, expected_shape, expected_centers
  ):
      crop = RandWeightedCropd(**init_params)
      crop.set_random_state(10)
      result = crop(input_data)
      self.assertTrue(len(result) == init_params["num_samples"])
      _len = len(tuple(input_data.keys()))
      self.assertTupleEqual(
          tuple(result[0].keys())[:_len], tuple(input_data.keys())
      )
  
file_path: MONAI/tests/test_rand_weighted_cropd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms.croppad.dictionary import RandWeightedCropd
  from monai.transforms.lazy.functional import apply_pending
  from tests.utils import TEST_NDARRAYS_ALL, NumpyImageTestCase2D, NumpyImageTestCase3D, assert_allclose
label_desc: Use image node_id 1 for calling the TestRandWeightedCrop obj's underlying member method code with example usage: obj.test_rand_weighted_cropd(_, init_params, input_data, expected_shape, expected_centers) without return types