code: def test_cluster_map_centroid_comparison_with_int():
      clusters1_indices = range(10)
      clusters2_indices = range(10, 15)
      clusters3_indices = [15]
  
      # Build a test ClusterMapCentroid
      centroid = np.zeros_like(features)
      cluster1 = ClusterCentroid(centroid.copy())
      for i in clusters1_indices:
          cluster1.assign(i, features)
  
      cluster2 = ClusterCentroid(centroid.copy())
      for i in clusters2_indices:
          cluster2.assign(i, features)
  
      cluster3 = ClusterCentroid(centroid.copy())
      for i in clusters3_indices:
          cluster3.assign(i, features)
  
      # Update centroids
      cluster1.update()
      cluster2.update()
      cluster3.update()
  
      clusters = ClusterMapCentroid()
      clusters.add_cluster(cluster1)
      clusters.add_cluster(cluster2)
      clusters.add_cluster(cluster3)
  
      subset = clusters < 5
      assert_equal(subset.sum(), 1)
      assert_array_equal(list(clusters[subset][0]), clusters3_indices)
  
      subset = clusters <= 5
      assert_equal(subset.sum(), 2)
      assert_array_equal(list(clusters[subset][0]), clusters2_indices)
      assert_array_equal(list(clusters[subset][1]), clusters3_indices)
  
      subset = clusters == 5
      assert_equal(subset.sum(), 1)
      assert_array_equal(list(clusters[subset][0]), clusters2_indices)
  
      subset = clusters != 5
      assert_equal(subset.sum(), 2)
      assert_array_equal(list(clusters[subset][0]), clusters1_indices)
      assert_array_equal(list(clusters[subset][1]), clusters3_indices)
  
      subset = clusters > 5
      assert_equal(subset.sum(), 1)
      assert_array_equal(list(clusters[subset][0]), clusters1_indices)
  
      subset = clusters >= 5
      assert_equal(subset.sum(), 2)
      assert_array_equal(list(clusters[subset][0]), clusters1_indices)
      assert_array_equal(list(clusters[subset][1]), clusters2_indices)
  
imports: import copy
  import itertools
  import numpy
  from numpy.testing import assert_array_equal, assert_raises, assert_equal
  from dipy.segment.clustering import Cluster, ClusterCentroid
  from dipy.segment.clustering import ClusterMap, ClusterMapCentroid
  from dipy.segment.clustering import Clustering
  from dipy.testing import assert_true, assert_false, assert_arrays_equal
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 27 for calling a global function with example usage: test_cluster_map_centroid_comparison_with_int() without return types