code: def _char_ngrams(vec, text_document):
      text_len = len(text_document)
      ngrams = []
      min_n, max_n = vec.ngram_range
      for n in xrange(min_n, min(max_n + 1, text_len + 1)):
          for i in xrange(text_len - n + 1):
              ngrams.append(([(i, i + n)], text_document[i : i + n]))
      return ngrams
  
file_path: eli5/eli5/sklearn/_span_analyzers.py
imports: from __future__ import absolute_import
  import re
  from six.moves import xrange
label_desc: Use image node_id 4 for calling a global function with example usage: _char_ngrams(vec, text_document) and returns: ngrams