code: def _is_mosaic(dicom_input):
      
      # for grouped dicoms
      if type(dicom_input) is list and type(dicom_input[0]) is list:
          header = dicom_input[0][0]
      else:  # all the others
          header = dicom_input[0]
  
      # check if image type contains m and mosaic
      if 'ImageType' not in header or 'MOSAIC' not in header.ImageType:
          return False
  
      if 'AcquisitionMatrix' not in header or header.AcquisitionMatrix is None:
          return False
  
      return True
docs: Use this function to detect if a dicom series is a siemens 4d dataset
      NOTE: Only the first slice will be checked so you can only provide an already sorted dicom directory
      (containing one series)