code: def test_infomax_n_iter(return_n_iter):
      """Test the return_n_iter kwarg."""
      X = np.random.random((3, 100))
      max_iter = 1
      r = infomax(
          X,
          max_iter=max_iter,
          extended=True,
          return_n_iter=return_n_iter,
      )
  
      if return_n_iter:
          assert isinstance(r, tuple)
          assert r[1] == max_iter
      else:
          assert isinstance(r, np.ndarray)
  
file_path: mne-python/mne/preprocessing/tests/test_infomax.py
imports: import numpy
  import pytest
  from numpy.testing import assert_almost_equal
  from scipy import linalg, stats
  from mne.preprocessing.infomax_ import infomax
label_desc: Use image node_id 6 for calling a global function with example usage: test_infomax_n_iter(return_n_iter) without return types