code: def _delete(self, *criterion):
          
          with self.flushing():
              count = self._query(*criterion).delete()
          if count == 0:
              raise ModelNotFoundError
          return True
docs: Delete a model by some criterion.
  
          Avoids race-condition check-then-delete logic by checking the count of affected rows.
  
          :raises `ResourceNotFound` if the row cannot be deleted.