code: def test_nystroem_default_parameters():
      rnd = np.random.RandomState(42)
      X = rnd.uniform(size=(10, 4))
  
      # rbf kernel should behave as gamma=None by default
      # aka gamma = 1 / n_features
      nystroem = Nystroem(n_components=10)
      X_transformed = nystroem.fit_transform(X)
      K = rbf_kernel(X, gamma=None)
      K2 = np.dot(X_transformed, X_transformed.T)
      assert_array_almost_equal(K, K2)
  
      # chi2 kernel should behave as gamma=1 by default
      nystroem = Nystroem(kernel="chi2", n_components=10)
      X_transformed = nystroem.fit_transform(X)
      K = chi2_kernel(X, gamma=1)
      K2 = np.dot(X_transformed, X_transformed.T)
      assert_array_almost_equal(K, K2)
  
imports: import re
  import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.kernel_approximation import AdditiveChi2Sampler, Nystroem, PolynomialCountSketch, RBFSampler, SkewedChi2Sampler
  from sklearn.metrics.pairwise import chi2_kernel, kernel_metrics, polynomial_kernel, rbf_kernel
  from sklearn.utils._testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 18 for calling a global function with example usage: test_nystroem_default_parameters() without return types