code: def _phrase_counts(sent):
      pos_seq = [w.tag_ for w in sent]
      tokens = [w.lower_ for w in sent]
      counts = Counter()
      for start, end in phrasemachine.extract_ngram_filter(
          pos_seq, minlen=2, maxlen=8
      ):
          phrase = phrasemachine.safejoin(
              [tokens[i] for i in range(start, end)]
          )
          phrase = phrase.lower()
          counts[phrase] += 1
      return counts
  
file_path: scattertext/scattertext/features/PhraseMachinePhrases.py
imports: from collections import Counter
  from scattertext.external.phrasemachine import phrasemachine
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
label_desc: Use image node_id 1 for calling a global function with example usage: _phrase_counts(sent) and returns: counts