code: def test_isomap():
      # Test chaining KNeighborsTransformer and Isomap with
      # neighbors_algorithm='precomputed'
      algorithm = "auto"
      n_neighbors = 10
  
      X, _ = make_blobs(random_state=0)
      X2, _ = make_blobs(random_state=1)
  
      # compare the chained version and the compact version
      est_chain = make_pipeline(
          KNeighborsTransformer(
              n_neighbors=n_neighbors,
              algorithm=algorithm,
              mode="distance",
          ),
          Isomap(n_neighbors=n_neighbors, metric="precomputed"),
      )
      est_compact = Isomap(
          n_neighbors=n_neighbors, neighbors_algorithm=algorithm
      )
  
      Xt_chain = est_chain.fit_transform(X)
      Xt_compact = est_compact.fit_transform(X)
      assert_array_almost_equal(Xt_chain, Xt_compact)
  
      Xt_chain = est_chain.transform(X2)
      Xt_compact = est_compact.transform(X2)
      assert_array_almost_equal(Xt_chain, Xt_compact)
  
file_path: scikit-learn/sklearn/neighbors/tests/test_neighbors_pipeline.py
imports: import numpy
  from sklearn.base import clone
  from sklearn.cluster import DBSCAN, SpectralClustering
  from sklearn.cluster.tests.common import generate_clustered_data
  from sklearn.datasets import make_blobs
  from sklearn.manifold import TSNE, Isomap, SpectralEmbedding
  from sklearn.neighbors import KNeighborsRegressor, KNeighborsTransformer, LocalOutlierFactor, RadiusNeighborsRegressor, RadiusNeighborsTransformer
  from sklearn.pipeline import make_pipeline
  from sklearn.utils._testing import assert_array_almost_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_isomap() without return types