code: def testEdgeBetweenness(self):
      # Full graph, no weights
      g = Graph.Full(5)
      cl = g.community_edge_betweenness().as_clustering()
      self.assertMembershipsEqual(cl, [0] * 5)
  
      # Full graph with weights
      g.es["weight"] = 1
      g[0, 1] = g[1, 2] = g[2, 0] = g[3, 4] = 10
  
      # We need to specify the desired cluster count explicitly; this is
      # because edge betweenness-based detection does not play well with
      # modularity-based cluster count selection (the edge weights have
      # different semantics) so we need to give igraph a hint
      cl = g.community_edge_betweenness(weights="weight").as_clustering(
          n=2
      )
      self.assertMembershipsEqual(cl, [0, 0, 0, 1, 1])
      self.assertAlmostEqual(cl.q, 0.2750, places=3)
  
imports: import math
  import random
  import unittest
  from igraph import Clustering, CohesiveBlocks, Cover, Graph, Histogram, InternalError, UniqueIdGenerator, VertexClustering, compare_communities, split_join_distance, set_random_number_generator
label_desc: Use image node_id 4 for calling the CommunityTests obj's underlying member method code with example usage: obj.testEdgeBetweenness() without return types