parameters: (self)
return_statement: return nodeCommunity
docstring: Returns a map of nodes to the set it belongs.
          Sets are denoted by integers so that largest
          community has smallest number etc.
docstring_summary: Returns a map of nodes to the set it belongs.
          Sets are denoted by integers so that largest
          community has smallest number etc.
docstring_tokens: Returns a map of nodes to the set it belongs . Sets are denoted by integers so that largest community has smallest number etc .
function: def getSetsForNodes(self):
          """
          Returns a map of nodes to the set it belongs.
          Sets are denoted by integers so that largest
          community has smallest number etc.
          """
          nodeCommunity = {}
          for i, c in enumerate(self.comm):
              for node in c:
                  nodeCommunity[node] = i
          return nodeCommunity
function_tokens: def getSetsForNodes ( self ) : nodeCommunity = { } for i , c in enumerate ( self . comm ) : for node in c : nodeCommunity [ node ] = i return nodeCommunity