code: def __compute_edges(label_image):
      """
      Computes the region neighbourhood defined by a star shaped n-dimensional structuring
      element (as returned by scipy.ndimage.generate_binary_structure(ndim, 1)) for the
      supplied region/label image.
      Note The returned set contains neither duplicates, nor self-references
      (i.e. (id_1, id_1)), nor reversed references (e.g. (id_1, id_2) and (id_2, id_1).
  
      @param label_image An image with labeled regions (nD).
      @param return A set with tuples denoting the edge neighbourhood.
      """
      return __compute_edges_nd(label_image)
  
file_path: medpy/medpy/graphcut/energy_label.py
imports: import math
  import sys
  import scipy.ndimage
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: __compute_edges(label_image) and returns: __compute_edges_nd