code: def test_cluster_map_clusters_sizes(rng):
      nb_clusters = 11
      # Generate random indices
      indices = [range(rng.integers(1, 10)) for _ in range(nb_clusters)]
  
      cluster_map = ClusterMap()
      clusters = [
          Cluster(indices=indices[i]) for i in range(nb_clusters)
      ]
      cluster_map.add_cluster(*clusters)
  
      assert_equal(
          cluster_map.clusters_sizes(), list(map(len, 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 18 for calling a global function with example usage: test_cluster_map_clusters_sizes(rng) without return types