docs: def getRankMap(self):
          """
          Returns a dictionary that associates the integer representation of each candidate with its
          position in the ranking, starting from 1.
          """
  
          # We sort the candidates based on the number of incoming edges they have in the graph. If 
          # two candidates have the same number, we assume that they are tied.
          incEdgesMap = self.getIncEdgesMap()
          sortedKeys = sorted(incEdgesMap.keys(), reverse = True)
          rankMap = dict()
          pos = 1
          for key in sortedKeys:
              cands = incEdgesMap[key]
              for cand in cands:
                  rankMap[cand] = pos
              pos += 1
          return rankMap