code: def get_data(self, size=None, addr=None):
          '''
          Gets data for incoming stream
          '''
          # readback memory offset
          if addr is None:
              addr = self._mem_bytes
  
          if size and self._mem_bytes < size:
              raise ValueError('Size is too big')
  
          if size is None:
              return self._intf.read(self._conf['base_addr'] + self._spi_mem_offset + addr, self._mem_bytes)
          else:
              return self._intf.read(self._conf['base_addr'] + self._spi_mem_offset + addr, sizef get_data(self, size=None, addr=None):
          '''
          Gets data for incoming stream
          '''
          # readback memory offset
          if addr is None:
              addr = self._mem_bytes
  
          if size and self._mem_bytes < size:
              raise ValueError('Size is too big')
  
          if size is None:
              return self._intf.read(self._conf['base_addr'] + self._spi_mem_offset + addr, self._mem_bytes)
          else:
              return self._intf.read(self._conf['base_addr'] + self._spi_mem_offset + addr, size)
docs: Gets data for incoming stream