code: def test_svd_LM_ones_matrix(self, shape, dtype):
      # Check that svds can deal with matrix_rank less than k in LM mode.
      k = 3
      n, m = shape
      A = np.ones((n, m), dtype=dtype)
  
      if self.solver == "lobpcg":
          with pytest.warns(UserWarning, match="The problem size"):
              U, s, VH = svds(A, k, solver=self.solver)
      else:
          U, s, VH = svds(A, k, solver=self.solver)
  
      _check_svds(A, k, U, s, VH, check_usvh_A=True, check_svd=False)
  
      # Check that the largest singular value is near sqrt(n*m)
      # and the other singular values have been forced to zero.
      assert_allclose(np.max(s), np.sqrt(n * m))
      s = np.array(sorted(s)[:-1]) + 1
      z = np.ones_like(s)
      assert_allclose(s, z)
  
imports: import os
  import re
  import copy
  import numpy
  from numpy.testing import assert_allclose, assert_equal, assert_array_equal
  import pytest
  from scipy.linalg import svd, null_space
  from scipy.sparse import csc_matrix, issparse, spdiags, random
  from scipy.sparse.linalg import LinearOperator, aslinearoperator
  from scipy.sparse.linalg import svds
  from scipy.sparse.linalg._eigen.arpack import ArpackNoConvergence
label_desc: Use image node_id 24 for calling the SVDSCommonTests obj's underlying member method code with example usage: obj.test_svd_LM_ones_matrix(shape, dtype) without return types