code: def test_compute_average_probability_of_words():
      summarizer = _build_summarizer(EMPTY_STOP_WORDS)
      word_freq = {"one": 1 / 6, "two": 2 / 6, "three": 3 / 6}
      s0 = []
      s1 = ["one"]
      s2 = ["two", "three"]
      s3 = ["two", "three", "three"]
      EPS = 0.0001
  
      assert summarizer._compute_average_probability_of_words(
          word_freq, s0
      ) == pytest.approx(0, EPS)
      assert summarizer._compute_average_probability_of_words(
          word_freq, s1
      ) == pytest.approx(1 / 6, EPS)
      assert summarizer._compute_average_probability_of_words(
          word_freq, s2
      ) == pytest.approx(5 / 12, EPS)
      assert summarizer._compute_average_probability_of_words(
          word_freq, s3
      ) == pytest.approx(8 / 18, EPS)
  
file_path: sumy/tests/test_summarizers/test_sum_basic.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import pytest
  from sumy.models.dom._sentence import Sentence
  from sumy.nlp.tokenizers import Tokenizer
  from sumy.summarizers.sum_basic import SumBasicSummarizer
  from sumy.nlp.stemmers import Stemmer
  from ..utils import build_document
label_desc: Use image node_id 11 for calling a global function with example usage: test_compute_average_probability_of_words() without return types