code: def test_exceptions():
      X = cupyx.scipy.sparse.eye(10)
      ipca = cuIPCA()
      with pytest.raises(TypeError):
          ipca.partial_fit(X)
  
      X = X.toarray()
      with pytest.raises(NotFittedError):
          ipca.transform(X)
  
      with pytest.raises(NotFittedError):
          ipca.inverse_transform(X)
  
      with pytest.raises(ValueError):
          cuIPCA(n_components=8).fit(X[:5])
  
      with pytest.raises(ValueError):
          cuIPCA(n_components=8).fit(X[:, :5])
  
file_path: cuml/python/cuml/tests/test_incremental_pca.py
imports: from cuml.common.exceptions import NotFittedError
  from cuml.testing.utils import array_equal
  from cuml.decomposition.incremental_pca import _svd_flip
  from cuml.decomposition import IncrementalPCA
  from cuml.datasets import make_blobs
  from sklearn.decomposition import IncrementalPCA
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: test_exceptions() without return types