code: def test_split_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."
      )
  
      comparison = []
      current_word = ""
      for i, c in enumerate(sequence):
          if c != " ":
              current_word += c
          else:
              if current_word:
                  comparison.append(
                      (current_word, (i - len(current_word), i - 1))
                  )
                  current_word = ""
  
      if current_word:
          comparison.append(
              (
                  current_word,
                  (
                      len(sequence) - len(current_word),
                      len(sequence) - 1,
                  ),
              )
          )
          current_word = ""
  
      result_to_test = list(split_indices(sequence))
      assert len(comparison) == len(result_to_test)
      assert comparison == result_to_test
  
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 4 for calling a global function with example usage: test_split_indices() without return types