code: def testClusterGraph(self):
      cl = VertexClustering(self.graph, [0, 0, 0, 1, 1, 1, 2, 2, 2, 2])
      self.graph.delete_edges(
          self.graph.es.select(_between=([0, 1, 2], [3, 4, 5]))
      )
      clg = cl.cluster_graph({"string": "concat", "int": max})
  
      self.assertTrue(sorted(clg.get_edgelist()) == [(0, 2), (1, 2)])
      self.assertTrue(not clg.is_directed())
      self.assertTrue(clg.vs["string"] == ["aaa", "bbc", "ccab"])
      self.assertTrue(clg.vs["int"] == [41, 64, 47])
  
      clg = cl.cluster_graph({"string": "concat", "int": max}, False)
      self.assertTrue(
          sorted(clg.get_edgelist())
          == [(0, 0)] * 3
          + [(0, 2)] * 12
          + [(1, 1)] * 3
          + [(1, 2)] * 12
          + [(2, 2)] * 6
      )
      self.assertTrue(not clg.is_directed())
      self.assertTrue(clg.vs["string"] == ["aaa", "bbc", "ccab"])
      self.assertTrue(clg.vs["int"] == [41, 64, 47])
  
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 VertexClusteringTests obj's underlying member method code with example usage: obj.testClusterGraph() without return types