code: def testFromStringAttribute(self):
      cl = VertexClustering.FromAttribute(self.graph, "string")
      self.assertTrue(cl.membership == [0, 0, 0, 1, 1, 2, 2, 2, 0, 1])
  
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 2 for calling the VertexClusteringTests obj's underlying member method code with example usage: obj.testFromStringAttribute() without return types