code: def test_expand_indices(params: dict, expected: Any):
      if "exception" in expected:
          with pytest.raises(expected["exception"]):
              out = expand_indices(**params)
          return
      else:
          out = expand_indices(**params)
          if "sum" in expected and "shape" in expected:
              assert params["arr"][out].shape == expected["shape"]
              assert params["arr"][out].sum() == expected["sum"]
          else:
              assert all(
                  [
                      np.all(a == b)
                      for a, b in list(zip(out, expected["value"]))
                  ]
              )
  
imports: import pytest
  from pytest_lazyfixture import lazy_fixture
  from quantus.helpers.utils import *
label_desc: Use image node_id 37 for calling a global function with example usage: test_expand_indices(params, expected) without return types