def delete(self, instance_or_query):
        sm = self.model(instance_or_query)
        # not an instance of a Model. Assume it is a query.
        if is_query(instance_or_query):
            if instance_or_query.session is not self:
                raise ValueError('Adding a query generated by another session')
            sm._delete_query.append(instance_or_query)
        else:
            instance_or_query = sm.delete(instance_or_query, self)
        if not self.transaction:
            transaction = self.begin()
            return transaction.commit(
                lambda: transaction.deleted.get(sm._meta))
        else:
            return instance_or_query
return the full API url (with proto://host...)
dataset/ETHPy150Open lsbardel/python-stdnet/stdnet/odm/session.py/Session.delete--crossover with--dataset/ETHPy150Open jupyterhub/jupyterhub/jupyterhub/orm.py/Hub.api_url