An extension to Python standard library itertools