code: def test_svd_LM_ones_matrix():
      # Check that svds can deal with matrix_rank less than k in LM mode.
      k = 3
      for n, m in (6, 5), (5, 5), (5, 6):
          for t in float, complex:
              A = np.ones((n, m), dtype=t)
              U, s, VH = svds(A, k)
  
              # Check some generic properties of svd.
              _check_svds(A, k, U, s, VH)
  
              # 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))
              assert_array_equal(sorted(s)[:-1], 0)
  
imports: from __future__ import division, print_function, absolute_import
  import threading
  import itertools
  import numpy
  from numpy.testing import assert_allclose, assert_array_almost_equal_nulp, assert_equal, assert_array_equal
  from pytest import raises
  import pytest
  from numpy import dot, conj, random
  from scipy.linalg import eig, eigh, hilbert, svd
  from scipy.sparse import csc_matrix, csr_matrix, isspmatrix, diags, rand
  from scipy.sparse.linalg import LinearOperator, aslinearoperator
  from scipy.sparse.linalg.eigen.arpack import eigs, eigsh, svds, ArpackNoConvergence, arpack
  from scipy._lib._gcutils import assert_deallocated, IS_PYPY
  from scipy._lib._numpy_compat import suppress_warnings
label_desc: Use image node_id 30 for calling a global function with example usage: test_svd_LM_ones_matrix() without return types