code: def test_dbscan():
      # Test chaining RadiusNeighborsTransformer and DBSCAN
      radius = 0.3
      n_clusters = 3
      X = generate_clustered_data(n_clusters=n_clusters)
  
      # compare the chained version and the compact version
      est_chain = make_pipeline(
          RadiusNeighborsTransformer(radius=radius, mode="distance"),
          DBSCAN(metric="precomputed", eps=radius),
      )
      est_compact = DBSCAN(eps=radius)
  
      labels_chain = est_chain.fit_predict(X)
      labels_compact = est_compact.fit_predict(X)
      assert_array_almost_equal(labels_chain, labels_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 3 for calling a global function with example usage: test_dbscan() without return types