code: def index_map(data):
    
    (entry, text_fn) = data
    text = text_fn()
  
    logging.debug("Got %s", entry.filename)
    for s in split_into_sentences(text):
      for w in split_into_words(s.lower()):
        yield (w, entry.filename)
docs: Index demo map function.