code: def test_adaptive_weights_convergence():
      """Test convergence and lack of convergence when setting adaptive=True."""
      data = np.random.default_rng(0).random((5, 100))
      sfreq = 500
      with pytest.warns(
          RuntimeWarning,
          match="Iterative multi-taper PSD computation did not converge.",
      ):
          psd_array_multitaper(data, sfreq, adaptive=True, max_iter=2)
      psd_array_multitaper(data, sfreq, adaptive=True, max_iter=200)
  
file_path: mne-python/mne/time_frequency/tests/test_multitaper.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from mne.time_frequency import psd_array_multitaper
  from mne.time_frequency.multitaper import dpss_windows
  from mne.utils import _record_warnings
label_desc: Use image node_id 3 for calling a global function with example usage: test_adaptive_weights_convergence() without return types