code: def test_tf_metrics():
      summarizer = LexRankSummarizer()
  
      sentences = [
          ("this", "sentence", "is", "simple", "sentence"),
          (
              "this",
              "is",
              "simple",
              "sentence",
              "yes",
              "is",
              "too",
              "too",
              "too",
          ),
      ]
      metrics = summarizer._compute_tf(sentences)
  
      expected = [
          {
              "this": 1 / 2,
              "is": 1 / 2,
              "simple": 1 / 2,
              "sentence": 1.0,
          },
          {
              "this": 1 / 3,
              "is": 2 / 3,
              "yes": 1 / 3,
              "simple": 1 / 3,
              "sentence": 1 / 3,
              "too": 1.0,
          },
      ]
      assert expected == metrics
  
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  import math
  import numpy
  import pytest
  import sumy.summarizers.lex_rank
  from sumy.nlp.stemmers.czech import stem_word
  from sumy.nlp.tokenizers import Tokenizer
  from sumy.parsers.plaintext import PlaintextParser
  from sumy.summarizers.lex_rank import LexRankSummarizer
  from sumy.utils import get_stop_words
  from ..utils import build_document, load_resource
label_desc: Use image node_id 2 for calling a global function with example usage: test_tf_metrics() without return types