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: Return the number of epochs.
  
  Returns
  -------
  n_epochs : int
      The number of remaining epochs.
  
  Notes
  -----
  This function only works if bad epochs have been dropped.
  
  Examples
  --------
  This can be used as::
  
      >>> epochs.drop_bad()  # doctest: +SKIP
      >>> len(epochs)  # doctest: +SKIP
      43
      >>> len(epochs.events)  # doctest: +SKIP
      43
docstr_tok: ["Return","the","number","of","epochs",".","Returns","--","--","--","-","n_epochs",":","int","The","number","of","remaining","epochs",".","Notes","--","--","-","This","function","only","works","if","bad","epochs","have","been","dropped",".","Examples","--","--","--","--","This","can","be","used","as",":",":",">",">",">","epochs.drop_bad","(",")","#","doctest",":","+SKIP",">",">",">","len","(","epochs",")","#","doctest",":","+SKIP","43",">",">",">","len","(","epochs.events",")","#","doctest",":","+SKIP","43"]
code: def __len__(self):
      """Return the number of epochs.
  
      Returns
      -------
      n_epochs : int
          The number of remaining epochs.
  
      Notes
      -----
      This function only works if bad epochs have been dropped.
  
      Examples
      --------
      This can be used as::
  
          >>> epochs.drop_bad()  # doctest: +SKIP
          >>> len(epochs)  # doctest: +SKIP
          43
          >>> len(epochs.events)  # doctest: +SKIP
          43
      """
      from ..epochs import BaseEpochs
  
      if isinstance(self, BaseEpochs) and not self._bad_dropped:
          raise RuntimeError(
              "Since bad epochs have not been dropped, the "
              "length of the Epochs is not known. Load the "
              "Epochs with preload=True, or call "
              "Epochs.drop_bad(). To find the number "
              "of events in the Epochs, use "
              "len(Epochs.events)."
          )
      return len(self.events)
  
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 5 for calling the GetEpochsMixin obj's underlying member method code with example usage: obj.__len__() and returns: len