Optionally include pair of last and first element of iterator in `itertools.pairwise`

Ok, I just decided that just like human lawbreakers, such lawbreaking iterators should be put in chains. Literally. So that they can’t illegally continue after their stoppage. Like:

from itertools import batched, chain

for batch in batched(chain(BrokenIterator()), 5):
    print(batch)

Then the output is:

(1, 2)