code: def test_trap_music():
      """Test TRAP-MUSIC."""
      evoked = mne.read_evokeds(
          fname_ave, condition="Right Auditory", baseline=(None, 0)
      )
      evoked.crop(tmin=0.05, tmax=0.15)  # select N100
      evoked.pick(picks="meg")
      forward = mne.read_forward_solution(fname_fwd)
      noise_cov = mne.read_cov(fname_cov)
      dipoles = trap_music(evoked, forward, noise_cov, n_dipoles=2)
      assert len(dipoles) == 2
  
file_path: mne-python/mne/beamformer/tests/test_rap_music.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose
  from scipy import linalg
  import mne
  from mne.beamformer import rap_music, trap_music
  from mne.cov import regularize
  from mne.datasets import testing
  from mne.minimum_norm.tests.test_inverse import assert_var_exp_log
  from mne.utils import catch_logging
label_desc: Use image node_id 7 for calling a global function with example usage: test_trap_music() without return types