docs: def _build_word_co_occurance_graph(self, phrase_list):
          """Builds the co-occurance graph of words in the given body of text to
          compute degree of each word.
  
          :param phrase_list: List of List of strings where each sublist is a
                              collection of words which form a contender phrase.
          """
          co_occurance_graph = defaultdict(lambda: defaultdict(lambda: 0))
          for phrase in phrase_list:
              # For each phrase in the phrase list, count co-occurances of the
              # word with other words in the phrase.
              #
              # Note: Keep the co-occurances graph as is, to help facilitate its
              # use in other creative ways if required later.
              for (word, coword) in product(phrase, phrase):
                  co_occurance_graph[word][coword] += 1
          self.degree = defaultdict(lambda: 0)
          for key in co_occurance_graph:
              self.degree[key] = sum(co_occurance_graph[key].values())