<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def notify_rollover(self, stream):
 """Notify that a reading in the given stream was overwritten. Args: stream (DataStream):
 The stream that had overwritten data. """


        self.offset -= 1

        if not self.matches(stream):
            return

        if self._count == 0:
            raise InternalError("BufferedStreamWalker out of sync with storage engine, count was wrong.")

        self._count -= 1