code: def test_randomized_svd_infinite_rank():
      # Check that extmath.randomized_svd can handle noisy matrices
      n_samples = 100
      n_features = 500
      rank = 5
      k = 10
  
      # let us try again without 'low_rank component': just regularly but slowly
      # decreasing singular values: the rank of the data matrix is infinite
      X = make_low_rank_matrix(
          n_samples=n_samples,
          n_features=n_features,
          effective_rank=rank,
          tail_strength=1.0,
          random_state=0,
      )
      assert X.shape == (n_samples, n_features)
  
      # compute the singular values of X using the slow exact method
      _, s, _ = linalg.svd(X, full_matrices=False)
      for normalizer in ["auto", "none", "LU", "QR"]:
          # compute the singular values of X using the fast approximate method
          # without the iterated power method
          _, sa, _ = randomized_svd(
              X,
              k,
              n_iter=0,
              power_iteration_normalizer=normalizer,
              random_state=0,
          )
  
          # the approximation does not tolerate the noise:
          assert np.abs(s[:k] - sa).max() > 0.1
  
          # compute the singular values of X using the fast approximate method
          # with iterated power method
          _, sap, _ = randomized_svd(
              X,
              k,
              n_iter=5,
              power_iteration_normalizer=normalizer,
              random_state=0,
          )
  
          # the iterated power method is still managing to get most of the
          # structure at the requested rank
          assert_almost_equal(s[:k], sap, decimal=3)
  
imports: import numpy
  import pytest
  from scipy import linalg, sparse
  from scipy.linalg import eigh
  from scipy.sparse.linalg import eigsh
  from scipy.special import expit
  from sklearn.datasets import make_low_rank_matrix, make_sparse_spd_matrix
  from sklearn.utils import gen_batches
  from sklearn.utils._arpack import _init_arpack_v0
  from sklearn.utils._testing import assert_allclose, assert_allclose_dense_sparse, assert_almost_equal, assert_array_almost_equal, assert_array_equal, skip_if_32bit
  from sklearn.utils.extmath import _deterministic_vector_sign_flip, _incremental_mean_and_var, _randomized_eigsh, _safe_accumulator_op, cartesian, density, log_logistic, randomized_svd, row_norms, safe_sparse_dot, softmax, stable_cumsum, svd_flip, weighted_mode
  from sklearn.utils.fixes import COO_CONTAINERS, CSC_CONTAINERS, CSR_CONTAINERS, DOK_CONTAINERS, LIL_CONTAINERS, _mode
label_desc: Use image node_id 10 for calling a global function with example usage: test_randomized_svd_infinite_rank() without return types