code: def contrast(image, mask=slice(None)):
      r"""
      Takes a simple or multi-spectral image and returns the contrast of the texture.
  
      Fcon = standard_deviation(gray_value) / (kurtosis(gray_value)**0.25)
  
      Parameters
      ----------
      image : array_like or list/tuple of array_like
          A single image or a list/tuple of images (for multi-spectral case).
      mask : array_like
          A binary mask for the image or a slice object
      Returns
      -------
      contrast : float
          High differences in gray value distribution is represented in a high contrast value.
  
      See Also
      --------
  
  
      """
      image = numpy.asarray(image)
  
      # set default mask or apply given mask
      if not type(mask) is slice:
          if not type(mask[0] is slice):
              mask = numpy.array(mask, copy=False, dtype=numpy.bool_)
      image = image[mask]
  
      standard_deviation = numpy.std(image)
      kurtosis = stats.kurtosis(
          image, axis=None, bias=True, fisher=False
      )
      n = 0.25  # The value n=0.25 is recommended as the best for discriminating the textures.
  
      Fcon = standard_deviation / (kurtosis**n)
  
      return Fcon
  
file_path: medpy/medpy/features/texture.py
imports: import numpy
  from scipy.ndimage import uniform_filter, sobel, maximum_filter, minimum_filter, gaussian_filter
  from scipy import stats
  from math import factorial
label_desc: Use image node_id 2 for calling a global function with example usage: contrast(image, mask) and returns: Fcon