code: def test_spacing(self):
      image = numpy.asarray(
          [
              [0, 0, 0, 0, 0],
              [0, 0, 2, 0, 0],
              [0, 0, 2, 0, 0],
              [0, 0, 2, 0, 0],
              [0, 0, 2, 0, 0],
          ],
          dtype=float,
      )
      fgmarkers = numpy.asarray(
          [
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 1, 0, 0],
          ],
          dtype=numpy.bool_,
      )
      bgmarkers = numpy.asarray(
          [
              [1, 0, 0, 0, 1],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
          ],
          dtype=numpy.bool_,
      )
      expected = image.astype(numpy.bool_)
      graph = graph_from_voxels(
          fgmarkers,
          bgmarkers,
          boundary_term=boundary_difference_division,
          boundary_term_args=(image, 1.0, (1.0, 5.0)),
      )
      result = self.__execute(graph, image)
      assert_array_equal(result, expected)
  
imports: import unittest
  import numpy
  from numpy.testing import assert_array_equal
  from medpy.graphcut import graph_from_voxels
  from medpy.graphcut.energy_voxel import boundary_difference_linear, boundary_difference_exponential, boundary_difference_division, boundary_difference_power, boundary_maximum_linear, boundary_maximum_exponential, boundary_maximum_division, boundary_maximum_power, regional_probability_map
label_desc: Use image node_id 10 for calling the TestEnergyVoxel obj's underlying member method code with example usage: obj.test_spacing() without return types