code: def hemispheric_difference(
      image,
      sigma_active=7,
      sigma_reference=7,
      cut_plane=0,
      voxelspacing=None,
      mask=slice(None),
  ):
      r"""
      Computes the hemispheric intensity difference between the brain hemispheres of an brain image.
  
      Cuts the image along the middle of the supplied cut-plane. This results in two
      images, each containing one of the brains hemispheres.
  
      For each of these two, the following steps are applied:
  
      1. One image is marked as active image
      2. The other hemisphere image is marked as reference image
      3. The reference image is fliped along the cut_plane
      4. A gaussian smoothing is applied to the active image with the supplied sigma
      5. A gaussian smoothing is applied to the reference image with the supplied sigma
      6. The reference image is substracted from the active image, resulting in the
         difference image for the active hemisphere
  
      Finally, the two resulting difference images are stitched back together, forming a
      hemispheric difference image of the same size as the original.
  
      Note that the supplied gaussian kernel sizes (sigmas) are sensitive to the images
      voxel spacing.
  
      If the number of slices along the cut-plane is odd, the central slice is
      interpolated from the two hemisphere difference images when stitching them back
      together.
  
      Parameters
      ----------
      image : array_like or list/tuple of array_like
          A single image or a list/tuple of images (for multi-spectral case).
      sigma_active : number or sequence of numbers
          Standard deviation for Gaussian kernel of the active image. The standard
          deviations of the Gaussian filter are given for each axis as a sequence, or as a
          single number, in which case it is equal for all axes. Note that the voxel
          spacing of the image is taken into account, the given values are treated
          as mm.
      sigma_reference : number or sequence of numbers
          Standard deviation for Gaussian kernel of the reference image. The standard
          deviations of the Gaussian filter are given for each axis as a sequence, or as a
          single number, in which case it is equal for all axes. Note that the voxel
          spacing of the image is taken into account, the given values are treated
          as mm.
      cut_plane : integer
          he axes along which to cut. This is usually the coronal plane.
      voxelspacing : sequence of floats
          The side-length of each voxel.
      mask : array_like
          A binary mask for the image.
  
      Returns
      -------
      hemispheric_difference : ndarray
          The intensity differences between the locally smoothed hemispheres of the image.
          The resulting voxel value's magnitude denotes symmetrical its asymmetry. The
          direction is revealed by the sign. That means that the resulting image will be
          symmetric in absolute values, but differ in sign.
  
      Raises
      ------
      ArgumentError
          If the supplied cut-plane dimension is invalid.
  
      """
      return _extract_feature(
          _extract_hemispheric_difference,
          image,
          mask,
          sigma_active=sigma_active,
          sigma_reference=sigma_reference,
          cut_plane=cut_plane,
          voxelspacing=voxelspacing,
      )
  
imports: import numpy
  from scipy.ndimage import gaussian_filter, median_filter
  from scipy.ndimage import gaussian_gradient_magnitude
  from scipy.interpolate.interpolate import interp1d
  from scipy.ndimage import distance_transform_edt
  from scipy.ndimage._ni_support import _get_output
  from .utilities import join
  from ..core import ArgumentError
  from ..filter import sum_filter
label_desc: Use image node_id 11 for calling a global function with example usage: hemispheric_difference(image, sigma_active, sigma_reference, cut_plane, voxelspacing, mask) and returns: _extract_feature