code: def test_check_clustering_error():
      # Test warning message for continuous values
      rng = np.random.RandomState(42)
      noise = rng.rand(500)
      wavelength = np.linspace(0.01, 1, 500) * 1e-6
      msg = (
          "Clustering metrics expects discrete values but received "
          "continuous values for label, and continuous values for "
          "target"
      )
  
      with pytest.warns(UserWarning, match=msg):
          check_clusterings(wavelength, noise)
  
imports: import warnings
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from sklearn.metrics.cluster import adjusted_mutual_info_score, adjusted_rand_score, completeness_score, contingency_matrix, entropy, expected_mutual_information, fowlkes_mallows_score, homogeneity_completeness_v_measure, homogeneity_score, mutual_info_score, normalized_mutual_info_score, pair_confusion_matrix, rand_score, v_measure_score
  from sklearn.metrics.cluster._supervised import _generalized_average, check_clusterings
  from sklearn.utils import assert_all_finite
  from sklearn.utils._testing import assert_almost_equal
label_desc: Use image node_id 22 for calling a global function with example usage: test_check_clustering_error() without return types