code: def read_header(self, file_handle, nextdata_offset=0):
          
          header = {'FCS format': file_handle.read(6)}
  
          file_handle.read(4)  # 4 space characters after the FCS format
  
          for field in ('text start', 'text end', 'data start', 'data end', 'analysis start',
                        'analysis end'):
              s = file_handle.read(8)
              try:
                  field_value = int(s)
              except ValueError:
                  field_value = 0
              header[field] = field_value + nextdata_offset
  
          # Checking that the location of the TEXT segment is specified
          for k in ('text start', 'text end'):
              if header[k] == 0:
                  raise ValueError(u'The FCS file "{}" seems corrupted. (Parser cannot locate '
                                   u'information about the "{}" segment.)'.format(self.path, k))
              elif header[k] > self._file_size:
                  raise ValueError(u'The FCS file "{}" is corrupted. "{}" segment '
                                   u'is larger than file size'.format(self.path, k))
              else:
                  # All OK
                  pass
  
          self._data_start = header['data start']
          self._data_end = header['data start']
  
          if header['analysis end'] - header['analysis start'] != 0:
              warnings.warn(u'There appears to be some information in the ANALYSIS segment of file '
                            u'{0}. However, it might not be read correctly.'.format(self.path))
  
          self.annotation['__header__'] = header
docs: Read the header of the FCS file.
  
          The header specifies where the annotation, data and analysis are located inside the binary
          file.
  
          Args:
              file_handle: buffer containing FCS file.
              nextdata_offset: byte offset of a set header from file start specified by $NEXTDATA