code: def test_non_convergence():
      """Test non-convergence of MxNE solver to catch unexpected bugs."""
      n, p, t, alpha = 30, 40, 20, 1.0
      rng = np.random.RandomState(0)
      G = rng.randn(n, p)
      G /= np.std(G, axis=0)[None, :]
      X = np.zeros((p, t))
      X[0] = 3
      X[4] = -2
      M = np.dot(G, X)
  
      # Impossible to converge with only 1 iteration and tol 1e-12
      # In case of non-convegence, we test that no error is returned.
      args = (M, G, alpha, 1, 1e-12)
      with catch_logging() as log:
          mixed_norm_solver(
              *args,
              active_set_size=None,
              debias=True,
              solver="bcd",
              verbose=True,
          )
      log = log.getvalue()
      assert "Convergence reached" not in log
  
file_path: mne-python/mne/inverse_sparse/tests/test_mxne_optim.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_array_less
  from mne.inverse_sparse.mxne_optim import _Phi, _PhiT, dgap_l21l1, iterative_mixed_norm_solver, iterative_tf_mixed_norm_solver, mixed_norm_solver, norm_epsilon, norm_epsilon_inf, tf_mixed_norm_solver
  from mne.time_frequency._stft import stft_norm2
  from mne.utils import _record_warnings, catch_logging
label_desc: Use image node_id 3 for calling a global function with example usage: test_non_convergence() without return types