def get_status(self, status_value, message=None):
        """
        Build a Status XML block for a SAML 1.1 Response.
        """
        status = etree.Element('Status')
        status_code = etree.SubElement(status, 'StatusCode')
        status_code.set('Value', 'samlp:' + status_value)
        if message:
            status_message = etree.SubElement(status, 'StatusMessage')
            status_message.text = message
        return status
Build a Status XML block for a SAML 1.1 Response.