def METHOD_NAME(self, result):
    self._size = result.get('totalBytes', self._size)
    self._bytes_processed = result.get('bytesScanned', self._bytes_processed)
    if 'data' in result:
        return result.get('data')
    if 'fatal' in result:
        error = self._error_cls(
            error=result['name'],
            is_fatal=result['fatal'],
            description=result['description'],
            position=result['position']
        )
        if self._errors:
            self._errors(error)
    return None