code: def test_ec():
      for i in range(1, 4):
          _, box1 = randombox((40,) * i)
          f = D_TO_FUNCS[i][1]
          assert_almost_equal(f(box1), 1)
          # While we're here, test we can use different dtypes, and that values
          # other than 0 or 1 raise an error.
          for dtt in sum(
              [np.sctypes[t] for t in ("int", "uint", "float")], []
          ):
              box1_again = box1.copy().astype(dtt)
              assert_almost_equal(f(box1_again), 1)
              box1_again[(10,) * i] = 2
              pytest.raises(ValueError, f, box1_again)
  
imports: from itertools import combinations
  import numpy
  import numpy.linalg
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from ..None import intvol
label_desc: Use image node_id 17 for calling a global function with example usage: test_ec() without return types