code: def return_dat(self, chan, begsam, endsam):
          
          dat = _read_memmap(self.eeg_file, self.dshape, begsam, endsam,
                             self.data_type, self.data_order)
  
          return dat[chan, :] * self.gain[chan, None]
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