code: def test_word_ngrams_indices():
      sequence = (
          "Hello my name is Bob, I like eating pizza, chicken, chips and ice cream. Maybe I should eat some"
          " more salad but it's so booooring. I just... like eating pizza, chicken, chips and ice cream so much."
      )
  
      n_values = [1, 2, 3, 5, 13]
  
      for n in n_values:
          ngrams = [
              " ".join(ngram)
              for ngram in simple_ngram(sequence.split(), n)
          ]
          tracker = defaultdict(int)
          comparison = []
          for ngram in ngrams:
              while True:
                  start = sequence.find(ngram, tracker[ngram])
                  assert start != -1  # testing the test
  
                  end = start + len(ngram) - 1
                  tracker[ngram] = end + 1
  
                  # ignore partial word matches
                  if (start != 0 and sequence[start - 1] != " ") or (
                      end != len(sequence) - 1
                      and sequence[end + 1] != " "
                  ):
                      pass
                  else:
                      break
  
              comparison.append((ngram, (start, end)))
  
          result_to_test = list(word_ngrams_indices(sequence, n))
          assert len(result_to_test) == len(comparison)
          assert result_to_test == comparison
  
file_path: lm-evaluation-harness/tests/test_janitor.py
imports: import re
  from collections import defaultdict
  from lm_eval.decontamination.janitor import Janitor, form_ngrams, word_ngrams, split_indices, word_ngrams_indices
label_desc: Use image node_id 5 for calling a global function with example usage: test_word_ngrams_indices() without return types