code: def test_kernel_pca_consistent_transform():
      """Check robustness to mutations in the original training array
  
      Test that after fitting a kPCA model, it stays independent of any
      mutation of the values of the original data object by relying on an
      internal copy.
      """
      # X_fit_ needs to retain the old, unmodified copy of X
      state = np.random.RandomState(0)
      X = state.rand(10, 10)
      kpca = KernelPCA(random_state=state).fit(X)
      transformed1 = kpca.transform(X)
  
      X_copy = X.copy()
      X[:, 0] = 666
      transformed2 = kpca.transform(X_copy)
      assert_array_almost_equal(transformed1, transformed2)
  
imports: import warnings
  import numpy
  import pytest
  import sklearn
  from sklearn.datasets import load_iris, make_blobs, make_circles
  from sklearn.decomposition import PCA, KernelPCA
  from sklearn.exceptions import NotFittedError
  from sklearn.linear_model import Perceptron
  from sklearn.metrics.pairwise import rbf_kernel
  from sklearn.model_selection import GridSearchCV
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils._testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from sklearn.utils.fixes import CSR_CONTAINERS
  from sklearn.utils.validation import _check_psd_eigenvalues
label_desc: Use image node_id 3 for calling a global function with example usage: test_kernel_pca_consistent_transform() without return types