code: def prev_this_next(it, sentinel=None):
      """Utility to return (prev, this, next) tuples from an iterator"""
      i1, i2, i3 = tee(it, 3)
      next(i3, None)
      return zip(chain([sentinel], i1), i2, chain(i3, [sentinel]))
  
file_path: pdvega/doc/sphinxext/pdvega_ext/utils.py
imports: import ast
  import json
  import importlib
  from hashlib import md5
  from itertools import tee, chain
label_desc: Use image node_id 5 for calling a global function with example usage: prev_this_next(it, sentinel) and returns: zip