code: def ndb_delete(self, entity_or_key):
      
      if ndb is not None and isinstance(entity_or_key, ndb.Model):
        key = entity_or_key.key
      else:
        key = entity_or_key
      self.ndb_deletes.append(key)
docs: Like delete(), but for NDB entities/keys.