code: def return_dat(self, chan, begsam, endsam):
          
          TRL = 0
          try:
              ft_data = loadmat(self.filename, struct_as_record=True,
                                squeeze_me=True)
              ft_data = ft_data[VAR]
  
              data = ft_data['trial'].item(TRL)
  
          except NotImplementedError:
              from h5py import File
  
              with File(self.filename) as f:
                  data = f[f[VAR]['trial'][TRL].item()].value.T
  
          return data[chan, begsam:endsam]
docs: Return the data as 2D numpy.ndarray.
  
          Parameters
          ----------
          chan : int or list
              index (indices) of the channels to read
          begsam : int
              index of the first sample
          endsam : int
              index of the last sample
  
          Returns
          -------
          numpy.ndarray
              A 2d matrix, with dimension chan X samples