'Load all data, dropping bad epochs along the way.
Parameters
out : bool
Return the data. Setting this to False is used to reject bad
epochs without caching all the data, which saves memory.
verbose : bool, str, int, or None
If not None, override default verbose level (see
:func:`mne.verbose` and :ref:`Logging documentation <tut_logging>`
for more). Defaults to self.verbose.'

@verbose
def _get_data(self, out=True, verbose=None):

    n_events = len(self.events)
    if self.preload:
        data = self._data
    else:
        data = np.empty((0, len(self.info['ch_names']), len(self.times)))
        logger.info(('Loading    data    for    %s    events    and    %s    original    time    points    ...' % (n_events, len(self._raw_times))))
    if self._bad_dropped:
        if (not out):
            return
        if self.preload:
            return data
        for idx in range(n_events):
            epoch_noproj = self._get_epoch_from_raw(idx)
            epoch_noproj = self._detrend_offset_decim(epoch_noproj)
            if self._do_delayed_proj:
                epoch_out = epoch_noproj
            else:
                epoch_out = self._project_epoch(epoch_noproj)
            if (idx == 0):
                data = np.empty((n_events, len(self.ch_names), len(self.times)), dtype=epoch_out.dtype)
            data[idx] = epoch_out
    else:
        good_idx = []
        n_out = 0
        assert (n_events == len(self.selection))
        for (idx, sel) in enumerate(self.selection):
            if self.preload:
                if self._do_delayed_proj:
                    epoch_noproj = self._data[idx]
                    epoch = self._project_epoch(epoch_noproj)
                else:
                    epoch_noproj = None
                    epoch = self._data[idx]
            else:
                epoch_noproj = self._get_epoch_from_raw(idx)
                epoch_noproj = self._detrend_offset_decim(epoch_noproj)
                epoch = self._project_epoch(epoch_noproj)
            epoch_out = (epoch_noproj if self._do_delayed_proj else epoch)
            (is_good, offending_reason) = self._is_good_epoch(epoch)
            if (not is_good):
                self.drop_log[sel] += offending_reason
                continue
            good_idx.append(idx)
            if (out or self.preload):
                if ((n_out == 0) and (not self.preload)):
                    data = np.empty((n_events, epoch_out.shape[0], epoch_out.shape[1]), dtype=epoch_out.dtype, order='C')
                data[n_out] = epoch_out
                n_out += 1
        self._bad_dropped = True
        logger.info(('%d    bad    epochs    dropped' % (n_events - len(good_idx))))
        if (len(good_idx) == 0):
            self.selection = np.array([], int)
            self.events = np.empty((0, 3))
        else:
            self.selection = self.selection[good_idx]
            self.events = np.atleast_2d(self.events[good_idx])
        if (out or self.preload):
            data.resize(((n_out,) + data.shape[1:]), refcheck=False)
    return (data if out else None)
