code: def apply_dics_epochs(
      epochs, filters, return_generator=False, verbose=None
  ):
      """Apply Dynamic Imaging of Coherent Sources (DICS) beamformer weights.
  
      Apply Dynamic Imaging of Coherent Sources (DICS) beamformer weights
      on single trial data.
  
      .. warning:: The result of this function is meant as an intermediate step
                   for further processing (such as computing connectivity). If
                   you are interested in estimating source time courses, use an
                   LCMV beamformer (:func:`make_lcmv`, :func:`apply_lcmv`)
                   instead. If you are interested in estimating spectral power at
                   the source level, use :func:`apply_dics_csd`.
      .. warning:: This implementation has not been heavily tested so please
                   report any issue or suggestions.
  
      Parameters
      ----------
      epochs : Epochs
          Single trial epochs.
      filters : instance of Beamformer
          DICS spatial filter (beamformer weights)
          Filter weights returned from :func:`make_dics`. The DICS filters must
          have been computed for a single frequency only.
      return_generator : bool
          Return a generator object instead of a list. This allows iterating
          over the stcs without having to keep them all in memory.
      %(verbose)s
  
      Returns
      -------
      stc: list | generator of (SourceEstimate | VolSourceEstimate)
          The source estimates for all epochs.
  
      See Also
      --------
      apply_dics
      apply_dics_tfr_epochs
      apply_dics_csd
      """
      _check_reference(epochs)
  
      if len(filters["weights"]) > 1:
          raise ValueError(
              "This function only works on DICS beamformer weights that have "
              "been computed for a single frequency. When calling make_dics(), "
              "make sure to use a CSD object with only a single frequency (or "
              "frequency-bin) defined."
          )
  
      info = epochs.info
      tmin = epochs.times[0]
  
      sel = _check_channels_spatial_filter(epochs.ch_names, filters)
      data = epochs.get_data(sel)
  
      stcs = _apply_dics(
          data=data, filters=filters, info=info, tmin=tmin
      )
  
      if not return_generator:
          stcs = list(stcs)
  
      return stcs
  
file_path: mne-python/mne/beamformer/_dics.py
imports: import numpy
  from .._fiff.pick import pick_channels, pick_info
  from ..channels import equalize_channels
  from ..forward import _subject_from_forward
  from ..minimum_norm.inverse import _check_depth, _check_reference, combine_xyz
  from ..rank import compute_rank
  from ..source_estimate import _get_src_type, _make_stc
  from ..time_frequency import EpochsTFR
  from ..time_frequency.tfr import _check_tfr_complex
  from ..utils import _check_channels_spatial_filter, _check_one_ch_type, _check_option, _check_rank, _validate_type, logger, verbose, warn
  from ._compute_beamformer import Beamformer, _check_src_type, _compute_beamformer, _compute_power, _prepare_beamformer_input, _proj_whiten_data
label_desc: Use image node_id 5 for calling a global function with example usage: apply_dics_epochs(epochs, filters, return_generator, verbose) and returns: stcs