code: def _get_sorted_mosaics(dicom_input):
      sorted_mosaics = sorted(dicom_input, key=lambda x: x.AcquisitionNumber)
      for index in range(0, len(sorted_mosaics) - 1):
          if sorted_mosaics[index].AcquisitionNumber >= sorted_mosaics[index + 1].AcquisitionNumber:
              raise ConversionValidationError("INCONSISTENT_ACQUISITION_NUMBERS")
      return sorted_mosaics