code: def get_doc_metadata(self, doc):
      phrase_counter = Counter()
      try:
          for phrase in doc._.phrases:
              if self._include_chunks:
                  for chunk in phrase.chunks:
                      phrase_counter[str(chunk)] += (
                          phrase.rank + self._rank_smoothing_constant
                      )
              else:
                  phrase_counter[phrase.text] += phrase.count * (
                      phrase.rank + self._rank_smoothing_constant
                  )
      except:  # Support for pytextrank<3
          import pytextrank
  
          tr = pytextrank.TextRank()
          tr.doc = doc
          phrases = tr.calc_textrank()
          for phrase in phrases:
              if self._include_chunks:
                  for chunk in phrase.chunks:
                      phrase_counter[str(chunk)] += (
                          phrase.rank + self._rank_smoothing_constant
                      )
              else:
                  phrase_counter[phrase.text] += phrase.count * (
                      phrase.rank + self._rank_smoothing_constant
                  )
  
      return phrase_counter
  
file_path: scattertext/scattertext/features/PyTextRankPhrases.py
imports: from collections import Counter
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
label_desc: Use image node_id 4 for calling the PyTextRankPhrases obj's underlying member method code with example usage: obj.get_doc_metadata(doc) and returns: phrase_counter