code: def test_summary(nlp: Language):
      """
      Summarization produces the expected results.
      Limit evaluation to Top-K
      """
      # given
      LIMIT_PHRASES = 10
      TOP_K = 5
  
      expected_trace = [  # pylint: disable=W0612
          [0, [2, 6]],
          [1, [0, 1]],
          [2, [0, 2]],
          [3, [8, 6]],
          [4, [5]],
      ]
  
      with open("dat/lee.txt", "r") as f:
          text = f.read()
          doc = nlp(text)
          tr = doc._.textrank
  
          # calculates *unit vector* and sentence distance measures
          # when
          trace = [
              [sent_dist.sent_id, list(sent_dist.phrases)]
              for sent_dist in tr.calc_sent_dist(
                  limit_phrases=LIMIT_PHRASES
              )
              if not sent_dist.empty()
          ]
  
          # then
          # print(trace[:TOP_K])
          # print(expected_trace)
  
          # NB: override for now
          # assert trace[:TOP_K] == expected_trace
          assert len(trace[:TOP_K]) > 4
  
file_path: pytextrank/tests/test_topicrank.py
imports: from spacy.language import Language
  from spacy.tokens import Span, Doc
  import spacy
  import sys
  from pytextrank.topicrank import TopicRankFactory
label_desc: Use image node_id 3 for calling a global function with example usage: test_summary(nlp) without return types