code: def test_incremental_pca_num_features_change():
      # Test that changing n_components will raise an error.
      rng = np.random.RandomState(1999)
      n_samples = 100
      X = rng.randn(n_samples, 20)
      X2 = rng.randn(n_samples, 50)
      X = da.from_array(X, chunks=[4, -1])
      X2 = da.from_array(X2, chunks=[4, -1])
  
      ipca = IncrementalPCA(n_components=None)
      ipca.fit(X)
      with pytest.raises(ValueError):
          ipca.partial_fit(X2)
  
imports: import numpy
  import pytest
  from dask import array
  from sklearn import datasets, decomposition
  from sklearn.decomposition import PCA
  from dask_ml.decomposition import IncrementalPCA
  from dask_ml.utils import flip_vector_signs
label_desc: Use image node_id 8 for calling a global function with example usage: test_incremental_pca_num_features_change() without return types