code: def test_silhouette_score_integer_precomputed():
      """Check that silhouette_score works for precomputed metrics that are integers.
  
      Non-regression test for #22107.
      """
      result = silhouette_score(
          [[0, 1, 2], [1, 0, 1], [2, 1, 0]],
          [0, 0, 1],
          metric="precomputed",
      )
      assert result == pytest.approx(1 / 6)
  
      # non-zero on diagonal for ints raises an error
      with pytest.raises(ValueError, match="contains non-zero"):
          silhouette_score(
              [[1, 1, 2], [1, 0, 1], [2, 1, 0]],
              [0, 0, 1],
              metric="precomputed",
          )
  
imports: import warnings
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from scipy.sparse import issparse
  from sklearn import datasets
  from sklearn.metrics import pairwise_distances
  from sklearn.metrics.cluster import calinski_harabasz_score, davies_bouldin_score, silhouette_samples, silhouette_score
  from sklearn.metrics.cluster._unsupervised import _silhouette_reduce
  from sklearn.utils._testing import assert_array_equal
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, DOK_CONTAINERS, LIL_CONTAINERS
label_desc: Use image node_id 15 for calling a global function with example usage: test_silhouette_score_integer_precomputed() without return types