def get(self, **kw):
        clone = self._clone()
        if kw:
            clone = clone.filter(**kw)
        cnt = clone.count()
        if cnt > 1:
            raise clone.sql_model.MultipleObjectsReturned(
                'get() returned more than one row -- it returned %s!' % cnt)
        elif cnt == 0:
            raise clone.sql_model.DoesNotExist(
                '%s matching query does not exist.' %
                self.sql_model.__class__.__name__)
        else:
            return clone[0:1][0]
dataset/ETHPy150Open mozilla/addons-server/src/olympia/editors/sql_model.py/RawSQLManager.get/original