<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_data(self, ptr, unbuffered=False):
 """Get decoded data from circular buffer. If unbuffered is false then a cached value that was obtained earlier may be returned."""

        result = _decode(self.get_raw_data(ptr, unbuffered),
                         self._reading_format[self.ws_type])
        return result