code: def get_spectrum_as_string(self, index):
          
          offsets = [self.mzOffsets[index], self.intensityOffsets[index]]
          lengths = [self.mzLengths[index], self.intensityLengths[index]]
          lengths[0] *= self.sizeDict[self.mzPrecision]
          lengths[1] *= self.sizeDict[self.intensityPrecision]
          self.m.seek(offsets[0])
          mz_string = self.m.read(lengths[0])
          self.m.seek(offsets[1])
          intensity_string = self.m.read(lengths[1])
          return mz_string, intensity_string
docs: Reads m/z array and intensity array of the spectrum at specified location
          from the binary file as a byte string. The string can be unpacked by the struct
          module. To get the arrays as numbers, use getspectrum
  
          :param index:
              Index of the desired spectrum in the .imzML file
          :rtype: Tuple[str, str]
  
          Output:
  
          mz_string:
              string where each character represents a byte of the mz array of the
              spectrum
          intensity_string:
              string where each character represents a byte of the intensity array of
              the spectrum