code: def compute_perplexity_score(
      text,
      non_printing_characters_re,
      digits_re,
      unicode_punctuation,
      sentencepiece_model,
      kenlm_model,
  ):
      text = FilteringFunctions.normalization(
          text=text,
          remove_non_printing_characters=True,
          strip=True,
          lower_case=False,
          standardize_whitespace=True,
          replace_digits_with_zeros=True,
          replace_unicode_punctuation=True,
          non_printing_characters_re=non_printing_characters_re,
          digits_re=digits_re,
          unicode_punctuation=unicode_punctuation,
      )
      text = FilteringFunctions.tokenization(
          text=text,
          sentencepiece_model=sentencepiece_model,
          join_on_whitespace=True,
      )
      doc_log_score, doc_length = 0, 0
      for line in text.split("\n"):
          log_score = kenlm_model.score(line)
          length = len(line.split()) + 1
          doc_log_score += log_score
          doc_length += length
      pp_score = 10.0 ** (-doc_log_score / doc_length)
      pp_score = round(pp_score, 1)
      return pp_score
  
imports: import json
  import re
  from collections import Counter
  import fasttext
  import kenlm
  import numpy
  import sentencepiece
  from obelics.utils import SPECIAL_CHARACTERS
label_desc: Use image node_id 31 for calling the FilteringFunctions obj's underlying member method code with example usage: obj.compute_perplexity_score(text, non_printing_characters_re, digits_re, unicode_punctuation, sentencepiece_model, kenlm_model) and returns: pp_score