code: def test_marching_cubes_anisotropic():
      # test spacing as numpy array (and not just tuple)
      spacing = np.array([1.0, 10 / 6.0, 16 / 6.0])
      ellipsoid_anisotropic = ellipsoid(
          6, 10, 16, spacing=spacing, levelset=True
      )
      _, surf = ellipsoid_stats(6, 10, 16)
  
      # Classic
      verts, faces = marching_cubes(
          ellipsoid_anisotropic, 0.0, spacing=spacing, method="lorensen"
      )[:2]
      surf_calc = mesh_surface_area(verts, faces)
      # Test within 1.5% tolerance for anisotropic. Will always underestimate.
      assert surf > surf_calc and surf_calc > surf * 0.985
  
      # Lewiner
      verts, faces = marching_cubes(
          ellipsoid_anisotropic, 0.0, spacing=spacing
      )[:2]
      surf_calc = mesh_surface_area(verts, faces)
      # Test within 1.5% tolerance for anisotropic. Will always underestimate.
      assert surf > surf_calc and surf_calc > surf * 0.985
  
      # Test marching cube with mask
      with pytest.raises(ValueError):
          verts, faces = marching_cubes(
              ellipsoid_anisotropic,
              0.0,
              spacing=spacing,
              mask=np.array([]),
          )[:2]
  
      # Test spacing together with allow_degenerate=False
      marching_cubes(
          ellipsoid_anisotropic,
          0,
          spacing=spacing,
          allow_degenerate=False,
      )
  
file_path: scikit-image/skimage/measure/tests/test_marching_cubes.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose
  from skimage.draw import ellipsoid, ellipsoid_stats
  from skimage.measure import marching_cubes, mesh_surface_area
label_desc: Use image node_id 2 for calling a global function with example usage: test_marching_cubes_anisotropic() without return types