code: def char_ngrams(key, beg, end):
      return chain.from_iterable(
          (
              imap(
                  lambda ngram: "".join(ngram),
                  zip(*[key[i:] for i in xrange(j)]),
              )
              for j in xrange(beg, min(len(key) + 1, end + 1))
          )
      )
  
file_path: magnitude/pymagnitude/converter_shared.py
imports: import hashlib
  import numpy
  import os
  from itertools import islice, chain
label_desc: Use image node_id 3 for calling a global function with example usage: char_ngrams(key, beg, end) and returns: chain