code: def test_remove_small_objects_dict(
      self, dtype, im_type, lbl, expected, params=None
  ):
      params = params or {}
      if expected is None:
          dtype = bool if len(np.unique(lbl)) == 1 else int
          expected = morphology.remove_small_objects(
              lbl.astype(dtype), **params
          )
      expected = im_type(expected, dtype=dtype)
      lbl = im_type(lbl, dtype=dtype)
      lbl_clean = RemoveSmallObjectsd("lbl", **params)({"lbl": lbl})[
          "lbl"
      ]
      assert_allclose(lbl_clean, expected, device_test=True)
      if isinstance(lbl, MetaTensor):
          assert_allclose(lbl.affine, lbl_clean.affine)
  
file_path: MONAI/tests/test_remove_small_objects.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms.post.array import RemoveSmallObjects
  from monai.transforms.post.dictionary import RemoveSmallObjectsd
  from monai.utils import optional_import
  from tests.utils import TEST_NDARRAYS, SkipIfNoModule, assert_allclose
label_desc: Use image node_id 3 for calling the TestRemoveSmallObjects obj's underlying member method code with example usage: obj.test_remove_small_objects_dict(dtype, im_type, lbl, expected, params) without return types