def retrieve(self):
        """Selects an item from the buffer and returns the item to the caller. The item is removed from the buffer.

        :return: The selected item.
        """
Selects an item from the buffer and returns the item to the caller. The item is removed from the buffer.

        :return: The selected item.
        
petastorm/reader_impl/shuffling_buffer.py