code: def test_n_components_none(setup):
      for solver in solver_list:
          # Ensures that n_components == None is handled correctly
          X = iris
          # We conduct the same test on X.T so that it is invariant to axis.
          for data in [X, X.T]:
              pca = PCA(svd_solver=solver)
              pca.fit(data)
              assert pca.n_components_ == min(data.shape)
  
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 9 for calling a global function with example usage: test_n_components_none(setup) without return types