code: def testLabelPropagation(self):
      # Nothing to test there really, since the algorithm is pretty
      # nondeterministic. We just do a few quick smoke tests.
      g = Graph.GRG(100, 0.2)
      cl = g.community_label_propagation()
  
      g = Graph([(0, 1), (1, 2), (2, 3)])
      g.es["weight"] = [2, 1, 2]
      g.vs["initial"] = [0, -1, -1, 1]
      cl = g.community_label_propagation(
          "weight", "initial", [1, 0, 0, 1]
      )
      self.assertMembershipsEqual(cl, [0, 0, 1, 1])
      cl = g.community_label_propagation(
          initial="initial", fixed=[1, 0, 0, 1]
      )
      self.assertTrue(
          cl.membership == [0, 0, 1, 1]
          or cl.membership == [0, 1, 1, 1]
          or cl.membership == [0, 0, 0, 1]
      )
  
      g = Graph.GRG(100, 0.2)
      g.vs["initial"] = [
          0
          if i == 0
          else 1
          if i == 99
          else 2
          if i == 49
          else random.randint(0, 50)
          for i in range(g.vcount())
      ]
      g.vs["dont_move"] = [i in (0, 49, 99) for i in range(g.vcount())]
      cl = g.community_label_propagation(
          initial="initial", fixed="dont_move"
      )
  
      # igraph is free to reorder the clusters so only co-membership will be
      # preserved, hence the next assertion
      self.assertTrue(
          cl.membership[0] != cl.membership[49]
          and cl.membership[49] != cl.membership[99]
      )
      self.assertTrue(x >= 0 and x <= 5 for x in cl.membership)
  
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 7 for calling the CommunityTests obj's underlying member method code with example usage: obj.testLabelPropagation() without return types