code: def test_sentences_rating():
      document = build_document(
          [
              "a c e g",
              "a b c d e f g",
              "b d f",
          ]
      )
      summarizer = TextRankSummarizer()
  
      ratings = summarizer.rate_sentences(document)
  
      assert ratings == {
          document.sentences[0]: pytest.approx(0.29714368215098025),
          document.sentences[1]: pytest.approx(0.42683373199392705),
          document.sentences[2]: pytest.approx(0.2760223553913001),
      }
      assert pytest.approx(sum(ratings.values())) == 1
  
file_path: sumy/tests/test_summarizers/test_text_rank.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  import pytest
  import sumy.summarizers.text_rank
  from sumy.summarizers.text_rank import TextRankSummarizer
  from sumy.nlp.stemmers import Stemmer
  from sumy._compat import to_unicode
  from ..utils import build_document
label_desc: Use image node_id 6 for calling a global function with example usage: test_sentences_rating() without return types