'Will unpack the received text. Depending on the context the original
response may have been transformed before transmission.
:param txt:
:param binding:
:param msgtype:
:return:'

@staticmethod
def unravel(txt, binding, msgtype='response'):

    if (binding not in [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST, BINDING_SOAP, BINDING_URI, BINDING_HTTP_ARTIFACT, None]):
        raise ValueError(("Don't    know    how    to    handle    '%s'" % binding))
    else:
        try:
            if (binding == BINDING_HTTP_REDIRECT):
                xmlstr = decode_base64_and_inflate(txt)
            elif (binding == BINDING_HTTP_POST):
                xmlstr = base64.b64decode(txt)
            elif (binding == BINDING_SOAP):
                func = getattr(soap, ('parse_soap_enveloped_saml_%s' % msgtype))
                xmlstr = func(txt)
            elif (binding == BINDING_HTTP_ARTIFACT):
                xmlstr = base64.b64decode(txt)
            else:
                xmlstr = txt
        except Exception:
            raise UnravelError()
    return xmlstr
