code: def test_boundary_difference_of_means_borders(self):
      label = [
          [[1, 1], [1, 1]],
          [[1, 2], [2, 2]],
          [
              [2, 2],
              [
                  2,
                  2,
              ],
          ],
      ]
      expected_result = {
          (0, 1): (sys.float_info.min, sys.float_info.min)
      }
      self.__run_boundary_difference_of_means_test(
          label, numpy.zeros_like(label), expected_result, "3D images"
      )
  
      gradient = [[0.0, 0.0, 0.0], [0.0, 0.0, sys.float_info.max]]
      label = [[1, 2, 3], [1, 2, 4]]
      expected_result = {
          (0, 1): (1.0, 1.0),
          (1, 2): (1.0, 1.0),
          (1, 3): (sys.float_info.min, sys.float_info.min),
          (2, 3): (sys.float_info.min, sys.float_info.min),
      }
      self.__run_boundary_difference_of_means_test(
          label, gradient, expected_result, "zero edge weight"
      )
  
      label = [[1, 3, 4], [1, 2, 5], [1, 2, 5]]
      expected_result = {
          (0, 1): (sys.float_info.min, sys.float_info.min),
          (0, 2): (sys.float_info.min, sys.float_info.min),
          (2, 3): (sys.float_info.min, sys.float_info.min),
          (1, 2): (sys.float_info.min, sys.float_info.min),
          (1, 4): (sys.float_info.min, sys.float_info.min),
          (3, 4): (sys.float_info.min, sys.float_info.min),
      }
      self.__run_boundary_difference_of_means_test(
          label,
          numpy.zeros(numpy.asarray(label).shape, int),
          expected_result,
          "integer gradient image",
      )
  
      label = scipy.asarray(
          label, order="C"
      )  # C-order, gradient same order
      gradient = scipy.zeros(label.shape, order="C")
      self.__run_boundary_difference_of_means_test(
          label, gradient, expected_result, "order (C, C)"
      )
  
      label = scipy.asarray(
          label, order="F"
      )  # Fortran order, gradient same order
      gradient = scipy.zeros(label.shape, order="F")
      self.__run_boundary_difference_of_means_test(
          label, gradient, expected_result, "order (F, F)"
      )
  
      label = scipy.asarray(
          label, order="C"
      )  # C-order, gradient different order
      gradient = scipy.zeros(label.shape, order="F")
      self.__run_boundary_difference_of_means_test(
          label, gradient, expected_result, "order (C, F)"
      )
  
      label = scipy.asarray(
          label, order="F"
      )  # F-order, gradient different order
      gradient = scipy.zeros(label.shape, order="C")
      self.__run_boundary_difference_of_means_test(
          label, gradient, expected_result, "order (F, C)"
      )
  
imports: import sys
  import math
  import unittest
  import scipy
  import numpy
  from numpy.testing import assert_raises
  from medpy.graphcut.energy_label import boundary_stawiaski, boundary_difference_of_means, boundary_stawiaski_directed, regional_atlas
  from medpy.graphcut.graph import GCGraph
label_desc: Use image node_id 6 for calling the TestEnergyLabel obj's underlying member method code with example usage: obj.test_boundary_difference_of_means_borders() without return types