def DN_x500_text(text):  # pylint: disable=invalid-name
     if hasattr(DN, "x500_text"):
         return DN(text).x500_text()
     # Emulate x500_text
     dn = DN(text)
     dn.rdns = reversed(dn.rdns)
     return str(dn)
def DN_x500_text(text):
    if hasattr(DN, "x500_text"):
        return DN(text).x500_text()
    else:
        # Emulate x500_text
        dn = DN(text)
        dn.rdns = reversed(dn.rdns)
        return str(dn)