def read_content(self, stream=False):
        db = get_blob_db()
        try:
            blob = db.get(self.blob_id, self._blobdb_bucket())
        except (__HOLE__, NotFound, BadName):
            raise AttachmentNotFound(self.name)

        if stream:
            return blob

        with blob:
            return blob.read()
dataset/ETHPy150Open dimagi/commcare-hq/corehq/form_processor/models.py/AbstractAttachment.read_content