code: def test_svd_maxiter(self):
      # check that maxiter works as expected: should not return accurate
      # solution after 1 iteration, but should with default `maxiter`
      if self.solver == "propack":
          if not has_propack:
              pytest.skip("PROPACK not available")
      A = np.diag(np.arange(9)).astype(np.float64)
      k = 1
      u, s, vh = sorted_svd(A, k)
  
      if self.solver == "arpack":
          message = "ARPACK error -1: No convergence"
          with pytest.raises(ArpackNoConvergence, match=message):
              svds(A, k, ncv=3, maxiter=1, solver=self.solver)
      elif self.solver == "lobpcg":
          with pytest.warns(UserWarning, match="Exited at iteration"):
              svds(A, k, maxiter=1, solver=self.solver)
      elif self.solver == "propack":
          message = "k=1 singular triplets did not converge within"
          with pytest.raises(np.linalg.LinAlgError, match=message):
              svds(A, k, maxiter=1, solver=self.solver)
  
      ud, sd, vhd = svds(A, k, solver=self.solver)  # default maxiter
      _check_svds(A, k, ud, sd, vhd, atol=1e-8)
      assert_allclose(np.abs(ud), np.abs(u), atol=1e-8)
      assert_allclose(np.abs(vhd), np.abs(vh), atol=1e-8)
      assert_allclose(np.abs(sd), np.abs(s), atol=1e-9)
  
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 19 for calling the SVDSCommonTests obj's underlying member method code with example usage: obj.test_svd_maxiter() without return types