code: def simple_ngram(sequence, n):
      ngrams = list()
      ngram = []
      for x in sequence:
          ngram.append(x)
          if len(ngram) == n:
              ngrams.append(tuple(ngram))
              ngram = ngram[1:]
  
      return ngrams
  
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 1 for calling a global function with example usage: simple_ngram(sequence, n) and returns: ngrams