code: def test_gridsearch_pipeline_precomputed():
      """Check that kPCA works as expected in a grid search pipeline (2)
  
      Test if we can do a grid-search to find parameters to separate
      circles with a perceptron model. This test uses a precomputed kernel.
      """
      X, y = make_circles(
          n_samples=400, factor=0.3, noise=0.05, random_state=0
      )
      kpca = KernelPCA(kernel="precomputed", n_components=2)
      pipeline = Pipeline(
          [("kernel_pca", kpca), ("Perceptron", Perceptron(max_iter=5))]
      )
      param_grid = dict(Perceptron__max_iter=np.arange(1, 5))
      grid_search = GridSearchCV(pipeline, cv=3, param_grid=param_grid)
      X_kernel = rbf_kernel(X, gamma=2.0)
      grid_search.fit(X_kernel, y)
      assert grid_search.best_score_ == 1
  
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 13 for calling a global function with example usage: test_gridsearch_pipeline_precomputed() without return types