docs: def _extract_median(image, mask = slice(None), size = 1, voxelspacing = None):
      """
      Internal, single-image version of `median`.
      """
      # set voxel spacing
      if voxelspacing is None:
          voxelspacing = [1.] * image.ndim
          
      # determine structure element size in voxel units
      size = _create_structure_array(size, voxelspacing)
          
      return _extract_intensities(median_filter(image, size), mask)