code: def return_hdr(self):
          
          # fieldtrip does not have this information
          orig = dict()
          subj_id = str()
          start_time = datetime.fromordinal(1)  # fake
  
          try:
              ft_data = loadmat(self.filename, struct_as_record=True,
                                squeeze_me=True)
              if VAR not in ft_data:
                  raise KeyError('Save the FieldTrip variable as ''{}'''
                                 ''.format(VAR))
              ft_data = ft_data[VAR]
  
              s_freq = ft_data['fsample'].astype('float64').item()
              n_samples = ft_data['trial'].item().shape[1]
              chan_name = list(ft_data['label'].item())
  
          except NotImplementedError:
  
              with File(self.filename) as f:
  
                  if VAR not in f.keys():
                      raise KeyError('Save the FieldTrip variable as ''{}'''
                                     ''.format(VAR))
  
                  s_freq = int(f[VAR]['fsample'].value.squeeze())
                  chan_name = read_hdf5_chan_name(f, f[VAR]['label'])
  
                  n_samples = int(around(f[f[VAR]['trial'][0].item()].shape[0]))
  
          return subj_id, start_time, s_freq, chan_name, n_samples, orig
docs: Return the header for further use.
  
          Returns
          -------
          subj_id : str
              subject identification code
          start_time : datetime
              start time of the dataset
          s_freq : float
              sampling frequency
          chan_name : list of str
              list of all the channels
          n_samples : int
              number of samples in the dataset
          orig : dict
              additional information taken directly from the header
  
          Notes
          -----
          It only reads hdf5 matlab files and the VARiable needs to be called
          'data'
  
          h5py is necessary for this function