code: def test_different_metric(global_dtype, metric, p, is_euclidean):
      # Isomap must work on various metric parameters work correctly
      # and must default to euclidean.
      X, _ = datasets.make_blobs(random_state=0)
      X = X.astype(global_dtype, copy=False)
  
      reference = manifold.Isomap().fit_transform(X)
      embedding = manifold.Isomap(metric=metric, p=p).fit_transform(X)
  
      if is_euclidean:
          assert_allclose(embedding, reference)
      else:
          with pytest.raises(
              AssertionError, match="Not equal to tolerance"
          ):
              assert_allclose(embedding, reference)
  
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 7 for calling a global function with example usage: test_different_metric(global_dtype, metric, p, is_euclidean) without return types