code: def test_n_components_none():
      # Ensures that n_components == None is handled correctly
      X = iris.data
      dX = da.from_array(X, chunks=X.shape)
      # We conduct the same test on X.T so that it is invariant to axis.
      # dask-ml has the extra restriction of a single block on axis 1
      # and Tall and skinny, so we skip X.T
      for data in [dX]:
          for solver in solver_list:
              pca = dd.PCA(svd_solver=solver)
              pca.fit(data)
              if solver == "arpack":
                  assert pca.n_components_ == min(data.shape) - 1
              else:
                  assert pca.n_components_ == min(data.shape)
  
imports: from itertools import product
  import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import pytest
  import scipy
  import sklearn.decomposition
  from dask.array.utils import assert_eq
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_raises
  from sklearn import datasets
  from sklearn.utils import check_random_state
  import dask_ml.decomposition
  from dask_ml._compat import DASK_2_26_0
  from dask_ml.utils import assert_estimator_equal, flip_vector_signs, svd_flip
label_desc: Use image node_id 12 for calling a global function with example usage: test_n_components_none() without return types