code: def test_missing_word_in_document_during_kl_divergence_computation(
      summarizer,
  ):
      """
      Missing word should not affect the result.
      See https://github.com/miso-belica/sumy/issues/41
      """
      EPS = 0.00001
  
      summary_frequences = {
          "one": 0.35,
          "two": 0.5,
          "three": 0.15,
          "four": 0.9,
      }
      document_frequencies = {
          "one": 1.0 / 3.0,
          "two": 1.0 / 3.0,
          "three": 1.0 / 3.0,
      }
  
      # This value comes from scipy.stats.entropy(w2_, w1_)
      # Note: the order of params is different
      kl_correct = 0.11475080798005841
      assert (
          abs(
              summarizer._kl_divergence(
                  summary_frequences, document_frequencies
              )
              - kl_correct
          )
          < EPS
      )
  
file_path: sumy/tests/test_summarizers/test_kl.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  import pytest
  from sumy.models.dom._sentence import Sentence
  from sumy.nlp.tokenizers import Tokenizer
  from sumy.summarizers.kl import KLSummarizer
  from ..utils import build_document
label_desc: Use image node_id 9 for calling a global function with example usage: test_missing_word_in_document_during_kl_divergence_computation(summarizer) without return types