def metadata_tostring_fix(desc, nspair, xmlstring=""):
    if not xmlstring:
        xmlstring = desc.to_string(nspair)
    if "\"xs:string\"" in xmlstring and XMLNSXS not in xmlstring:
        xmlstring = xmlstring.replace(MDNS, MDNS+XMLNSXS)
    return xmlstring
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/metadata.py/metadata_tostring_fix/original