code: def test_get_superpixel_segments(
      data: np.ndarray, params: dict, expected: Union[float, dict, bool]
  ):
      if "exception" in expected:
          with pytest.raises(expected["exception"]):
              get_superpixel_segments(
                  img=data,
                  segmentation_method=params["segmentation_method"],
              )
          return
      out = get_superpixel_segments(
          img=data, segmentation_method=params["segmentation_method"]
      )
      assert isinstance(out, expected["type"]), "Test failed."
  
imports: import pytest
  from pytest_lazyfixture import lazy_fixture
  from quantus.helpers.utils import *
label_desc: Use image node_id 22 for calling a global function with example usage: test_get_superpixel_segments(data, params, expected) without return types