def peek(self, size=-1):
        """
        Return bytes from the stream without advancing the position.

        Args:
            size (int): Number of bytes to read. -1 to read the full
                stream.

        Returns:
            bytes: bytes read
        """
        if not self._readable:
            raise UnsupportedOperation('read')

        with self._seek_lock:
            self._raw.seek(self._seek)
            return self._raw._peek(size)
def peek ( self , size = - 1 ) : if not self . _readable : raise UnsupportedOperation ( 'read' ) with self . _seek_lock : self . _raw . seek ( self . _seek ) return self . _raw . _peek ( size )
Return bytes from the stream without advancing the position.

        Args:
            size (int): Number of bytes to read. -1 to read the full
                stream.

        Returns:
            bytes: bytes read