code: def test_base_text_rank(doc: Doc):
      """
      Ranks unique keywords in a document correctly, sorted decreasing by
      centrality.
      """
      # given
      base_text_rank = BaseTextRankFactory()
  
      # when
      processed_doc = base_text_rank(doc)
      phrases = processed_doc._.phrases
  
      # then
      assert len(phrases) > 0
      assert len(set(p.text for p in phrases)) == len(phrases)
      assert phrases[0].rank == max(p.rank for p in phrases)
  
file_path: pytextrank/tests/test_base.py
imports: from spacy.language import Language
  from spacy.tokens import Span, Doc
  import spacy
  import sys
  from pytextrank.base import BaseTextRankFactory
label_desc: Use image node_id 1 for calling a global function with example usage: test_base_text_rank(doc) without return types