code: def test_pca_score_with_different_solvers(setup):
      digits = datasets.load_digits()
      X_digits = mt.tensor(digits.data)
  
      pca_dict = {
          svd_solver: PCA(
              n_components=30, svd_solver=svd_solver, random_state=0
          )
          for svd_solver in solver_list
      }
  
      for pca in pca_dict.values():
          pca.fit(X_digits)
          # Sanity check for the noise_variance_. For more details see
          # https://github.com/scikit-learn/scikit-learn/issues/7568
          # https://github.com/scikit-learn/scikit-learn/issues/8541
          # https://github.com/scikit-learn/scikit-learn/issues/8544
          assert mt.all(
              (pca.explained_variance_ - pca.noise_variance_) >= 0
          ).to_numpy()
  
      # Compare scores with different svd_solvers
      score_dict = {
          svd_solver: pca.score(X_digits).to_numpy()
          for svd_solver, pca in pca_dict.items()
      }
      assert_almost_equal(
          score_dict["full"], score_dict["randomized"], decimal=3
      )
  
imports: from itertools import product
  import numpy
  import pytest
  import scipy
  from sklearn import datasets
  from sklearn.utils._testing import assert_array_almost_equal, assert_almost_equal, assert_raises_regex, assert_raise_message, assert_raises
  from ....None import tensor
  from .._pca import PCA, _assess_dimension, _infer_dimension
label_desc: Use image node_id 22 for calling a global function with example usage: test_pca_score_with_different_solvers(setup) without return types