docs: def getWmg(self, normalize = False):
          """
          Generate a weighted majority graph that represents the whole profile. The function will
          return a two-dimensional dictionary that associates integer representations of each pair of
          candidates, cand1 and cand2, with the number of times cand1 is ranked above cand2 minus the
          number of times cand2 is ranked above cand1.
                  
          :ivar bool normalize: If normalize is True, the function will return a normalized graph
              where each edge has been divided by the value of the largest edge.
          """
  
          # Initialize a new dictionary for our final weighted majority graph.
          wmgMap = dict()
          for cand in self.candMap.keys():
              wmgMap[cand] = dict()
          for cand1, cand2 in itertools.combinations(self.candMap.keys(), 2):
              wmgMap[cand1][cand2] = 0
              wmgMap[cand2][cand1] = 0
  
          # Go through the wmgMaps and increment the value of each edge in our final graph with the 
          # edges in each of the wmgMaps. We take into account the number of times that the vote 
          # occured.
          for i in range(0, len(self.preferences)):
              preference = self.preferences[i]
              preferenceWmgMap = preference.wmgMap
              for cand1, cand2 in itertools.combinations(preferenceWmgMap.keys(), 2):
                  if cand2 in preferenceWmgMap[cand1].keys():
                      wmgMap[cand1][cand2] += preferenceWmgMap[cand1][cand2]*preference.count
                      wmgMap[cand2][cand1] += preferenceWmgMap[cand2][cand1]*preference.count
  
          # By default, we assume that the weighted majority graph should not be normalized. If
          # desired, we normalize by dividing each edge by the value of the largest edge. 
          if (normalize == True):
              maxEdge = float('-inf')
              for cand in wmgMap.keys():
                  maxEdge = max(maxEdge, max(wmgMap[cand].values()))
              for cand1 in wmgMap.keys():
                  for cand2 in wmgMap[cand1].keys():
                      wmgMap[cand1][cand2] = float(wmgMap[cand1][cand2])/maxEdge
          
          return wmgMap