code: def test_fastica_convergence_fail():
      # Test the FastICA algorithm on very simple data
      # (see test_non_square_fastica).
      # Ensure a ConvergenceWarning raised if the tolerance is sufficiently low.
      rng = np.random.RandomState(0)
  
      n_samples = 1000
      # Generate two sources:
      t = np.linspace(0, 100, n_samples)
      s1 = np.sin(t)
      s2 = np.ceil(np.sin(np.pi * t))
      s = np.c_[s1, s2].T
      center_and_norm(s)
  
      # Mixing matrix
      mixing = rng.randn(6, 2)
      m = np.dot(mixing, s)
  
      # Do fastICA with tolerance 0. to ensure failing convergence
      warn_msg = (
          "FastICA did not converge. Consider increasing tolerance "
          "or the maximum number of iterations."
      )
      with pytest.warns(ConvergenceWarning, match=warn_msg):
          ica = FastICA(
              algorithm="parallel",
              n_components=2,
              random_state=rng,
              max_iter=2,
              tol=0.0,
          )
          ica.fit(m.T)
  
imports: import itertools
  import os
  import warnings
  import numpy
  import pytest
  from scipy import stats
  from sklearn.decomposition import PCA, FastICA, fastica
  from sklearn.decomposition._fastica import _gs_decorrelation
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.utils._testing import assert_allclose
label_desc: Use image node_id 7 for calling a global function with example usage: test_fastica_convergence_fail() without return types