'Check the assertion
:param assertion:
:return: True/False depending on if the assertion is sane or not'

def _assertion(self, assertion, verified=False):

    if ((not hasattr(assertion, 'signature')) or (not assertion.signature)):
        logger.debug('unsigned')
        if self.require_signature:
            raise SignatureError('Signature    missing    for    assertion')
    else:
        logger.debug('signed')
        if (not verified):
            try:
                self.sec.check_signature(assertion, class_name(assertion), self.xmlstr)
            except Exception as exc:
                logger.error(('correctly_signed_response:    %s' % exc))
                raise
    self.assertion = assertion
    logger.debug(('assertion    context:    %s' % (self.context,)))
    logger.debug(('assertion    keys:    %s' % assertion.keyswv()))
    logger.debug(('outstanding_queries:    %s' % (self.outstanding_queries,)))
    if (self.context == 'AuthnReq'):
        self.authn_statement_ok()
    if (not self.condition_ok()):
        raise VerificationError('Condition    not    OK')
    logger.debug('---    Getting    Identity    ---')
    if ((self.context == 'AuthnReq') or (self.context == 'AttrQuery')):
        self.ava = self.get_identity()
        logger.debug(('---    AVA:    %s' % (self.ava,)))
    try:
        self.get_subject()
        if self.asynchop:
            if self.allow_unsolicited:
                pass
            elif (self.came_from is None):
                raise VerificationError('Came    from')
        return True
    except Exception:
        logger.exception('get    subject')
        raise
