def peek(self):
        """Peek at the next element.

        This may raise StopIteration.

        """
        if self._is_empty():
            self._buf = self._iterable.next()
        return self._buf
Peek at the next element.

        This may raise StopIteration.

        
recipes/Python/499379_GroupBySorted/recipe-499379.py