docs: def _get_mosaic_type(mosaic):
      """
      Check the extra ascconv headers for the mosaic type based on the slice position
      We always assume axial in this case
      the implementation resembles the last lines of documentation in
      https://www.icts.uiowa.edu/confluence/plugins/viewsource/viewpagesrc.action?pageId=54756326
      """
  
      ascconv_headers = _get_asconv_headers(mosaic)
  
      try:
          size = int(re.findall(r'sSliceArray\.lSize\s*=\s*(\d+)', ascconv_headers)[0])
  
          # get the locations of the slices
          slice_location = [None] * size
          for index in range(size):
              axial_result = re.findall(
                  r'sSliceArray\.asSlice\[%s\]\.sPosition\.dTra\s*=\s*([-+]?[0-9]*\.?[0-9]*)' % index,
                  ascconv_headers)
              if len(axial_result) > 0:
                  axial = float(axial_result[0])
              else:
                  axial = 0.0
              slice_location[index] = axial
  
          # should we invert (https://www.icts.uiowa.edu/confluence/plugins/viewsource/viewpagesrc.action?pageId=54756326)
          invert = False
          invert_result = re.findall(r'sSliceArray\.ucImageNumbTra\s*=\s*([-+]?0?x?[0-9]+)', ascconv_headers)
          if len(invert_result) > 0:
              invert_value = int(invert_result[0], 16)
              if invert_value >= 0:
                  invert = True
  
          # return the correct slice types
          if slice_location[0] <= slice_location[1]:
              if not invert:
                  return MosaicType.ASCENDING
              else:
                  return MosaicType.DESCENDING
          else:
              if not invert:
                  return MosaicType.DESCENDING
              else:
                  return MosaicType.ASCENDING
      except:
          traceback.print_exc()
          raise ConversionError("MOSAIC_TYPE_NOT_SUPPORTED")