def pairwise(<EOL>iterable: Iterable,<EOL>default_value: Any,<EOL>) -> Iterable[Tuple[Any, Any]]:
a, b = tee(iterable)<EOL>_ = next(b, default_value)<EOL>return zip_longest(a, b, fillvalue=default_value)<EOL>
Return pairs of items from `iterable`.

    pairwise([1, 2, 3], default_value=None) -> (1, 2) (2, 3), (3, None)