class_docstr: Class to add epoch selection and metadata to certain classes.
class_docstr_tok: ["Class","to","add","epoch","selection","and","metadata","to","certain","classes","."]
docstr: Iterate over epoch data.
  
  Parameters
  ----------
  return_event_id : bool
      If True, return both the epoch data and an event_id.
  
  Returns
  -------
  epoch : array of shape (n_channels, n_times)
      The epoch data.
  event_id : int
      The event id. Only returned if ``return_event_id`` is ``True``.
docstr_tok: ["Iterate","over","epoch","data",".","Parameters","--","--","--","--","--","return_event_id",":","bool","If","True",",","return","both","the","epoch","data","and","an","event_id",".","Returns","--","--","--","-","epoch",":","array","of","shape","(","n_channels",",","n_times",")","The","epoch","data",".","event_id",":","int","The","event","id",".","Only","returned","if","``","return_event_id","``","is","``","True","``","."]
code: def __next__(self, return_event_id=False):
      """Iterate over epoch data.
  
      Parameters
      ----------
      return_event_id : bool
          If True, return both the epoch data and an event_id.
  
      Returns
      -------
      epoch : array of shape (n_channels, n_times)
          The epoch data.
      event_id : int
          The event id. Only returned if ``return_event_id`` is ``True``.
      """
      if not hasattr(self, "_current_detrend_picks"):
          self.__iter__()  # ensure we're ready to iterate
      if self.preload:
          if self._current >= len(self._data):
              self._stop_iter()
          epoch = self._data[self._current]
          self._current += 1
      else:
          is_good = False
          while not is_good:
              if self._current >= len(self.events):
                  self._stop_iter()
              epoch_noproj = self._get_epoch_from_raw(self._current)
              epoch_noproj = self._detrend_offset_decim(
                  epoch_noproj, self._current_detrend_picks
              )
              epoch = self._project_epoch(epoch_noproj)
              self._current += 1
              is_good, _ = self._is_good_epoch(epoch)
          # If delayed-ssp mode, pass 'virgin' data after rejection decision.
          if self._do_delayed_proj:
              epoch = epoch_noproj
  
      if not return_event_id:
          return epoch
      else:
          return epoch, self.events[self._current - 1][-1]
  
imports: import json
  import logging
  from collections import OrderedDict
  from copy import deepcopy
  import numpy
  from ._logging import verbose, warn
  from .check import _check_pandas_installed, _check_preload, _validate_type
  from .numerics import _time_mask, object_hash, object_size
label_desc: Use image node_id 7 for calling the GetEpochsMixin obj's underlying member method code with example usage: obj.__next__(return_event_id) and returns: epoch, epoch,  self