code: def test_pipeline_with_nearest_neighbors_transformer(global_dtype):
      # Test chaining NearestNeighborsTransformer and Isomap with
      # neighbors_algorithm='precomputed'
      algorithm = "auto"
      n_neighbors = 10
  
      X, _ = datasets.make_blobs(random_state=0)
      X2, _ = datasets.make_blobs(random_state=1)
  
      X = X.astype(global_dtype, copy=False)
      X2 = X2.astype(global_dtype, copy=False)
  
      # compare the chained version and the compact version
      est_chain = pipeline.make_pipeline(
          neighbors.KNeighborsTransformer(
              n_neighbors=n_neighbors,
              algorithm=algorithm,
              mode="distance",
          ),
          manifold.Isomap(
              n_neighbors=n_neighbors, metric="precomputed"
          ),
      )
      est_compact = manifold.Isomap(
          n_neighbors=n_neighbors, neighbors_algorithm=algorithm
      )
  
      Xt_chain = est_chain.fit_transform(X)
      Xt_compact = est_compact.fit_transform(X)
      assert_allclose(Xt_chain, Xt_compact)
  
      Xt_chain = est_chain.transform(X2)
      Xt_compact = est_compact.transform(X2)
      assert_allclose(Xt_chain, Xt_compact)
  
imports: import math
  from itertools import product
  import numpy
  import pytest
  from scipy.sparse import rand
  from sklearn import clone, datasets, manifold, neighbors, pipeline, preprocessing
  from sklearn.datasets import make_blobs
  from sklearn.metrics.pairwise import pairwise_distances
  from sklearn.utils._testing import assert_allclose, assert_allclose_dense_sparse, assert_array_equal
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 6 for calling a global function with example usage: test_pipeline_with_nearest_neighbors_transformer(global_dtype) without return types