code: def test_iterative_reweighted_tfmxne():
      """Test convergence of irTF-MxNE solver."""
      M, G, true_active_set = _generate_tf_data()
      alpha_space = 38.0
      alpha_time = 0.5
      tstep, wsize = [4, 2], [64, 16]
  
      X_hat_tf, _, _ = tf_mixed_norm_solver(
          M,
          G,
          alpha_space,
          alpha_time,
          maxit=1000,
          tol=1e-4,
          wsize=wsize,
          tstep=tstep,
          verbose=False,
          n_orient=1,
          debias=False,
      )
      X_hat_bcd, active_set, _ = iterative_tf_mixed_norm_solver(
          M,
          G,
          alpha_space,
          alpha_time,
          1,
          wsize=wsize,
          tstep=tstep,
          maxit=1000,
          tol=1e-4,
          debias=False,
          verbose=False,
      )
      assert_allclose(X_hat_tf, X_hat_bcd, rtol=1e-3)
      assert_array_equal(np.where(active_set)[0], true_active_set)
  
      alpha_space = 50.0
      X_hat_bcd, active_set, _ = iterative_tf_mixed_norm_solver(
          M,
          G,
          alpha_space,
          alpha_time,
          3,
          wsize=wsize,
          tstep=tstep,
          n_orient=5,
          maxit=1000,
          tol=1e-4,
          debias=False,
          verbose=False,
      )
      assert_array_equal(np.where(active_set)[0], [0, 1, 2, 3, 4])
  
      alpha_space = 40.0
      X_hat_bcd, active_set, _ = iterative_tf_mixed_norm_solver(
          M,
          G,
          alpha_space,
          alpha_time,
          2,
          wsize=wsize,
          tstep=tstep,
          n_orient=2,
          maxit=1000,
          tol=1e-4,
          debias=False,
          verbose=False,
      )
      assert_array_equal(np.where(active_set)[0], [0, 1, 4, 5])
  
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 9 for calling a global function with example usage: test_iterative_reweighted_tfmxne() without return types