code: def apply_dics_csd(csd, filters, verbose=None):
      """Apply Dynamic Imaging of Coherent Sources (DICS) beamformer weights.
  
      Apply a previously computed DICS beamformer to a cross-spectral density
      (CSD) object to estimate source power in time and frequency windows
      specified in the CSD object :footcite:`GrossEtAl2001`.
  
      .. note:: Only power can computed from the cross-spectral density, not
                complex phase-amplitude, so vector DICS filters will be
                converted to scalar source estimates since power is strictly
                positive and so 3D directions cannot be combined meaningfully
                (the direction would be confined to the positive quadrant).
  
      Parameters
      ----------
      csd : instance of CrossSpectralDensity
          The data cross-spectral density (CSD) matrices. A source estimate is
          performed for each frequency or frequency-bin defined in the CSD
          object.
      filters : instance of Beamformer
          DICS spatial filter (beamformer weights)
          Filter weights returned from `make_dics`.
      %(verbose)s
  
      Returns
      -------
      stc : SourceEstimate
          Source power with frequency instead of time.
      frequencies : list of float
          The frequencies for which the source power has been computed. If the
          data CSD object defines frequency-bins instead of exact frequencies,
          the mean of each bin is returned.
  
      See Also
      --------
      apply_dics
      apply_dics_epochs
      apply_dics_tfr_epochs
  
      References
      ----------
      .. footbibliography::
      """  # noqa: E501
      ch_names = filters["ch_names"]
      vertices = filters["vertices"]
      n_orient = 3 if filters["is_free_ori"] else 1
      subject = filters["subject"]
      whitener = filters["whitener"]
      n_sources = filters["n_sources"]
  
      # If CSD is summed over multiple frequencies, take the average frequency
      frequencies = [np.mean(dfreq) for dfreq in csd.frequencies]
      n_freqs = len(frequencies)
  
      source_power = np.zeros((n_sources, len(csd.frequencies)))
  
      # Ensure the CSD is in the same order as the weights
      csd_picks = [csd.ch_names.index(ch) for ch in ch_names]
  
      logger.info("Computing DICS source power...")
      for i, freq in enumerate(frequencies):
          if n_freqs > 1:
              logger.info(
                  "    applying DICS spatial filter at "
                  f"{round(freq, 2)} Hz ({i + 1}/{n_freqs})"
              )
  
          Cm = csd.get_data(index=i)
          Cm = Cm[csd_picks, :][:, csd_picks]
          W = filters["weights"][i]
  
          # Whiten the CSD
          Cm = np.dot(whitener, np.dot(Cm, whitener.conj().T))
  
          source_power[:, i] = _compute_power(Cm, W, n_orient)
  
      logger.info("[done]")
  
      # compatibility with 0.16, add src_type as None if not present:
      filters, warn_text = _check_src_type(filters)
  
      return (
          _make_stc(
              source_power,
              vertices=vertices,
              src_type=filters["src_type"],
              tmin=0.0,
              tstep=1.0,
              subject=subject,
              warn_text=warn_text,
          ),
          frequencies,
      )
  
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 7 for calling a global function with example usage: apply_dics_csd(csd, filters, verbose) and returns: _make_stc,  frequencies