def delete_identity(session, identity):
    """Remove an identity from the session.

    This function removes from the session the identity given
    in `identity`. Take into account this function does not
    remove unique identities in the case they get empty.

    :param session: database session
    :param identity: identity to remove
    """
    uidentity = identity.uidentity
    uidentity.last_modified = datetime.datetime.utcnow()

    session.delete(identity)
    session.flush()
def delete_identity ( session , identity ) : uidentity = identity . uidentity uidentity . last_modified = datetime . datetime . utcnow ( ) session . delete ( identity ) session . flush ( )
Remove an identity from the session.

    This function removes from the session the identity given
    in `identity`. Take into account this function does not
    remove unique identities in the case they get empty.

    :param session: database session
    :param identity: identity to remove