code: def is_slice_increment_inconsistent(dicoms):
      
      sliceincrement_inconsistent = False
      first_image_position = numpy.array(dicoms[0].ImagePositionPatient)
      previous_image_position = numpy.array(dicoms[1].ImagePositionPatient)
  
      increment = first_image_position - previous_image_position
      for dicom_ in dicoms[2:]:
          current_image_position = numpy.array(dicom_.ImagePositionPatient)
          current_increment = previous_image_position - current_image_position
          if not numpy.allclose(increment, current_increment, rtol=0.05, atol=0.1):
              sliceincrement_inconsistent = True
              break
      return sliceincrement_inconsistent
docs: Validate that the distance between all slices is equal (or very close to)
  
      :param dicoms: list of dicoms