@staticmethod
    def parse_discovery_service_response(url="", query="",
                                         returnIDParam="entityID"):

        if url:
            part = urlparse(url)
            qsd = parse_qs(part[4])
        elif query:
            qsd = parse_qs(query)
        else:
            qsd = {}

        try:
            return qsd[returnIDParam][0]
        except KeyError:
            return ""
Deal with the response url from a Discovery Service
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/client_base.py/Base.parse_discovery_service_response