<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pop(self):
 """Pop a reading off of this stream and return it."""


        if self._count == 0:
            raise StreamEmptyError("Pop called on buffered stream walker without any data", selector=self.selector)

        while True:
            curr = self.engine.get(self.storage_type, self.offset)
            self.offset += 1

            stream = DataStream.FromEncoded(curr.stream)
            if self.matches(stream):
                self._count -= 1
                return curr