code: def _keep(
      word_freq: int,
      min_freq: int,
      min_len: int,
      max_len: int,
      dict_filter: Callable[[str], bool],
  ):
      
      if not word_freq or word_freq[1] < min_freq:
          return False
  
      word = word_freq[0]
      if not word or len(word) < min_len or len(word) > max_len or word[0] == ".":
          return False
  
      return dict_filter(word)
docs: Keep only Thai words with at least min_freq frequency
      and has length between min_len and max_len characters