code: def return_dat(self, chan, begsam, endsam):
          
          dat = empty((len(chan), endsam - begsam))
          dat.fill(NaN)
  
          for i_chan, sel_chan in enumerate(chan):
              with self.channels[sel_chan].open('rb') as f:
                  for i_dat, blk, i_blk in _select_blocks(self.blocks, begsam, endsam):
                      dat_in_rec = _read_block_continuous(f, blk)
                      dat[i_chan, i_dat[0]:i_dat[1]] = dat_in_rec[i_blk[0]:i_blk[1]]
  
          return dat * self.gain[chan, None]
docs: Read the data for some/all of the channels
  
          Parameters
          ----------
          chan : list of int
              indices of the channels to read
          begsam : int
              start sample to read
          endsam : int
              end sample to read (exclusive)
  
          Returns
          -------
          2D array
              chan X samples recordings