'The assertion can contain zero or one attributeStatements'

def get_identity(self):

    if (not self.assertion.attribute_statement):
        logger.error('Missing    Attribute    Statement')
        ava = {}
    else:
        assert (len(self.assertion.attribute_statement) == 1)
        _attr_statem = self.assertion.attribute_statement[0]
        logger.debug(('Attribute    Statement:    %s' % (_attr_statem,)))
        for aconv in self.attribute_converters:
            logger.debug(('Converts    name    format:    %s' % (aconv.name_format,)))
        self.decrypt_attributes(_attr_statem)
        ava = to_local(self.attribute_converters, _attr_statem, self.allow_unknown_attributes)
    return ava
