code: def test_unknown_shapes(fn, solver):
      rng = sk_check_random_state(42)
      X = rng.uniform(-1, 1, size=(10, 3))
      df = pd.DataFrame(X)
      ddf = dask.dataframe.from_pandas(df, npartitions=2)
  
      pca = dd.PCA(n_components=2, svd_solver=solver)
      fit_fn = getattr(pca, fn)
      X = ddf.values
      assert np.isnan(X.shape[0])
  
      if solver == "auto":
          with pytest.raises(
              ValueError, match="Cannot automatically choose PCA solver"
          ):
              fit_fn(X)
      else:
          X_hat = fit_fn(X)
          assert hasattr(pca, "components_")
          assert pca.n_components_ == 2
          assert pca.n_features_in_ == 3
          assert pca.n_samples_ == 10
          if fn == "fit_transform":
              assert np.isnan(X_hat.shape[0])
              assert X_hat.shape[1] == 2
  
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 30 for calling a global function with example usage: test_unknown_shapes(fn, solver) without return types